Open tomy0000000 opened 1 year ago
I think we can use custom route by cloudflare
I think we can use custom route by cloudflare
Thanks for your suggestion, but I'd lean toward having this problem fixed at Hugo instead of Monkey Patch.
Thanks for your suggestion, but I'd lean toward having this problem fixed at Hugo instead of Monkey Patch.
AFAIK, github cant use 404.html in subdirectory, the en/404.html is still exists but cannot use for github pages, in order to use 404 html in multilingual we need generate a custom 404.html inside folder static/404.html, in the custom 404.html I need to route redirect based on localstorage of language, this is to much and I doesnt have any idea again.
If using cloudflare we can use transform rule or redirect rule.
Thanks for your suggestion, but I'd lean toward having this problem fixed at Hugo instead of Monkey Patch.
AFAIK, github cant use 404.html in subdirectory, the en/404.html is still exists but cannot use for github pages, in order to use 404 html in multilingual we need generate a custom 404.html inside folder static/404.html, in the custom 404.html I need to route redirect based on localstorage of language, this is to much and I doesnt have any idea again.
If using cloudflare we can use transform rule or redirect rule.
Yes, I do understand, but I'd wait for Hugo to solve this issue instead of tampering with this on the server side.
The
404.html
gets created for each language directory, such aszh-tw/404.html
anden/404.html
, but GitHub Pages require custom404.html
to be located in the root directory, which is not compatible whendefaultContentLanguageInSubdir: true
is set in Hugo, see gohugoio/hugo#5161.Also, the 404 page is always shown in the default language, even when the English 404 page is generated.