citizenfx / fivem-docs

FiveM documentation repository
https://docs.fivem.net/
101 stars 300 forks source link

feat(page/doc): custom 404 page #443

Closed PsychoShock closed 2 months ago

PsychoShock commented 5 months ago

Should be handle following https://gohugo.io/templates/404/

Will also handle Github issue if someone found a invalid link

Issue is people that goes into 404 page can't "return home".

image

AvarianKnight commented 3 months ago

This sadly does not work, hugo does not seem to care about the 404 page in layouts.

PsychoShock commented 3 months ago

I wasn't sure. I spoke with some membrs years ago about this. It was a custom template that was suppose to be working. Sadly building docs are broken so no way to find out.

AvarianKnight commented 3 months ago

Building the docs works fine if you're using the custom fork.

You just have to make sure you build with go build --tags extended

spacevx commented 3 months ago

I wasn't sure. I spoke with some membrs years ago about this. It was a custom template that was suppose to be working. Sadly building docs are broken so no way to find out.

It's not broken.

See #417

AvarianKnight commented 2 months ago

Did a bit more research, this is not broken, the version of hugo we're on doesn't support showing the 404.html on localhost

Reference: https://discourse.gohugo.io/t/why-do-custom-404-pages-not-work-on-hugo-localhost/39227

AvarianKnight commented 2 months ago

This doesn't fix the 404 page for the UI though, sadly.