Comments (7)
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.
No, I mean if a user has a 404.html
in the project root, use that instead of this line.
from jus.
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.
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.
I've been following Surge.sh's ROUTER
format. See this project, yonder
(which Surge uses).
from jus.
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.
- 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.
- 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.
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)
- Consider using `consolidate.js` library for abstracting different template options
- Feature: Add YAML support for 'page' type files (not just for 'datafile' type) HOT 1
- List of excluded files HOT 8
- Inkscape-generated SVG error from `image-size` library HOT 1
- Don't try to parse `svg` fonts as images HOT 4
- Moved jus repos to a GitHub organization! HOT 1
- Replaceable Markdown processor HOT 2
- path-exists should be a dependency, not a dev-dependency?
- Modularizing jus HOT 19
- Serve a unique favicon.ico per project HOT 12
- Automagically generate thumbnails HOT 6
- Remove old 404 ¯\_(ツ)_/¯ message
- Remove unneeded 'href-type' dependency
- Overwriting /api HOT 9
- Can we import CSS files from node_modules? HOT 1
- Allow Sass Imports HOT 1
- jus development stalled by Node 4 support HOT 3
- Support for more handlebars helpers HOT 2
- Dynamic pages, filtering data, custom helpers, and other templating languages? HOT 8
- README is not up to date
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jus.