Giter Club home page Giter Club logo

Comments (7)

zeke avatar zeke commented on May 27, 2024

Just to clarify, do you mean adding a step to the build process that writes a default /404.html if one does not exist?

from jus.

cvan avatar cvan commented on May 27, 2024

No, I mean if a user has a 404.html in the project root, use that instead of this line.

from jus.

zeke avatar zeke commented on May 27, 2024

Great idea! I don't have time to work on this right away, but would happily merge and release a pull request if you're up for it.

from jus.

elingerojo avatar elingerojo commented on May 27, 2024

I am interested to work on it but need some feedback.
What about auto generating a plain vanilla 404 page if there is none already?

It could be placed in a auto generated folder. For the names of the 404 file and folder, we can use a configuration file like the redirects.json

Maybe could be a good idea to autogenerate jussettings.json in liu of the redirects.json and include the redirects in it.

The jussettings.json will be created only if there is none. This way, the user could edit it to fit.

...and if present, jus can use the information in it to name 404 file and/or folder, etc.

Other approach could be to have a settings folder with redirect.json and other settings files.

Any ideas to keep the jus configuration simplicity?

from jus.

cvan avatar cvan commented on May 27, 2024

I've been following Surge.sh's ROUTER format. See this project, yonder (which Surge uses).

from jus.

elingerojo avatar elingerojo commented on May 27, 2024

Surge.sh's ROUTER format looks good. It's clean and simple. And easy for the front-end developer to deduct how it works. I like it.

Project yonder make me rethink about the original objective of the 404 page.

  1. I could include some yonder code in the future but not as this issue solution but as a part of a solution for Routing (server-side like and client-side using Navigo or director. This will be another issue. And certainly could use the Surge.sh's ROUTER format.
  2. I realize, at present, that the 404 custom page is for the front-end Developer, not for the User that visit the static web site. Sorry, my bad.

Any server-side Routing solution will add some amount of obstructive configuration. And any client-side Routing will add obstructive boilerplate.

Now I understand the original @cvan proposal that solves the issue.

No, I mean if a user has a 404.html in the project root, use that instead of this line.

... and do not break the Jus promise:

Jus ...for making static websites with no configuration and no boilerplate code.

The decision on how to serve a 404 page to be seen by the User who visits the web site should be left to the Developer.

...so this 404 solution should be just a visual appealing help on the developing stage.

I opened a custom-404 branch and it's ready to PR

from jus.

zeke avatar zeke commented on May 27, 2024

Hey sorry for the delay responding; I'm offline for the week. I will take a look at all this in detail and get back to you next week.

from jus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.