githubgithub-actionshugostatic-siteionos

Custom 404 page when deploying static sites with Ionos Deploy Now, and HUGO server system


I've never worked with HUGO before, it is apparenantly some kind of static site hosting service, I am the owner of an Ionos domain, and I want to use their "Deploy Now" service, they allow you to host a website on github, and use Hugo to run it, I dont know how to set a custom 404 page, the site works fine, but the 404 is a horrible plaintext 404 page. How can I change this?

Any help at all would be appreciated greatly.


Solution

  • Does your project have a 404.html template? If not, you can create one in the layouts directory, and it should get picked up by Hugo, at least locally.

    There's some more info on Hugo's docs: https://gohugo.io/templates/404/

    Not too familiar with Ionos, but looks like you might need a step of additional config to get this picked up: https://www.ionos.com/help/hosting/html-and-css/create-your-own-error-pages-linux-webhosting/