Getting 404

Hello out there,

Do you know why I get a 404 on http://localhost:1313/test .
After doing hugo new test.md and hugo serve.

Here is my dummy project: FirstWithThisName / dummy-hugo · GitLab

thanks for your help

You are more likely to receive a prompt and accurate response if you post a link to the public repository for your project.

See https://discourse.gohugo.io/t/requesting-help/9132.

Let us see your code

Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.

If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.

Thanks for replying, I added a like to a dummy project.

You placed the following within the [params] table:

baseURL = "http://some-homepage.org/"
languageCode = "de-DE"

These belong in the top-level (root) table.

diff --git a/config.toml b/config.toml
index fd7d79d..a8ed8ed 100644
--- a/config.toml
+++ b/config.toml
@@ -1,3 +1,5 @@
+baseURL = "http://some-homepage.org/"
+languageCode = "de-DE"
 theme = "anatole"
 
 [menu]
@@ -29,5 +31,3 @@ theme = "anatole"
 description = "Description"
 profilePicture = "images/profile.jpg"
 title = "Hompeage"
-baseURL = "http://some-homepage.org/"
-languageCode = "de-DE"

Thank you but I still get the 404 for all pages except “/”.

If I add an etry linebreak into a file after the “header” section the sites appiers until i restart hugo then I ret a 404 again.

Rename content/index.md to content/_index.md.

Ref:

Thank you, this fixed my issue.
I would never tried this because the examples in

Don’t has an _index.md.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.