[BUG] custom 404.html not in root
Describe the bug
any page who not found: https://demo.gethinode.com/en/gsfgsf
shows the server (netlify) and not the custom 404.html
Expected behavior
404.html in public folder
Screenshots
Host environment
Please complete the following information where applicable.
- Hinode version: 0.26.7
https://github.com/gohugoio/hugo/issues/5161
Thanks for submitting a PR to fix this @d-oit! I've merged the changes with the main branch.
I've revised the server headers in v0.27-beta-3, so I'll include your remarks here: https://gethinode.com/docs/advanced-settings/server-headers/
BTW, I adjusted the redirects from ** to * to improve compatibility with Netlify:
[[redirects]]
from = '/fr/*'
to = '/fr/404.html'
status = 404
[[redirects]]
from = '/nl/*'
to = '/nl/404.html'
status = 404
[[redirects]]
from = '/en/*'
to = '/en/404.html'
status = 404
[[redirects]] # Default language should be last.
from = '/*'
to = '/en/404.html'
status = 404
Hmm, I am confused.
I thought that this: https://github.com/gethinode/hinode/blob/main/netlify.toml for the hinode template.
That's why i create a pyhton script to copy https://github.com/gethinode/hinode/blob/main/netlify.toml to netlify.toml in the exampleSite to use this in netlify.toml for the exampleSite with the 404 custom.
Did see your last changes.
Forgot the annoying part of the Python copy script:
if 'from' in redirect: redirect['from'] = redirect['from'].replace('**', '*')
I documented the configuration here: https://gethinode.com/docs/advanced-settings/server-headers/#configuring-custom-404-pages. Thanks again for your help @d-oit!
I thought that this: https://github.com/gethinode/hinode/blob/main/netlify.toml for the hinode template.
It did, but I changed it in v0.27.0-beta3. You can now use data/server.toml and netlify.toml instead. The advantage being that the content security policies are now generated and synchronized automatically. See https://gethinode.com/docs/advanced-settings/server-headers/ for more details.
you need a prompt or wizard for all the config 😄 great feature 👍🏻
@markdumay here i my playwright test if you needed https://github.com/d-oit/d-oit.github.io/blob/main/tests/tests-custom404/showCustom404.spec.js