Hugo renders 404 instead of static page

Hello!

I’m trying to wrap my head around Hugo by trying to migrate my existing Wordpress website to it. Unfortunatelly i encountered a first blocker at a very beginning of this journey. I’m pretty aware that there are few topics here and there about the exact same issue but none of them was able to help me resolve the issue. Here is what’s up:

I created the simplest layout setup which is a layouts/_default/single.html file with a following content:

{{ .Content }}

And also two content files:

content/index.html

---
title: Homepage
---

Hello from homepage

content/about.html

---
title: About
---

Hello from about

But, no matter what i do, the /about/ URL gives me 404 not found error. Homepage works just fine but the about one not. I literally tried every solution found in several topics and it’s always the same. I’m on hugo v0.32.4 / macOS

Thanks in advance for any clues!

Not quite sure, but I get that when Hugo is looking for a missing template sometimes.

How is your content structured?

It’s structured like that:

image

Run hugo server with the --verbose switch to see what it’s choking on.

Here is the output:

Building sites … INFO 2018/01/18 11:43:02 syncing static files to /
WARN 2018/01/18 11:43:02 No translation bundle found for default language "en"
WARN 2018/01/18 11:43:02 Translation func for language en not found, use default.
WARN 2018/01/18 11:43:02 i18n not initialized, check that you have language file (in i18n) that matches the site language or the default language.
INFO 2018/01/18 11:43:02 found taxonomies: map[string]string{"tag":"tags", "category":"categories"}
WARN 2018/01/18 11:43:02 [en] Unable to locate layout for "taxonomyTerm": [taxonomy/category.terms.en.html.html taxonomy/category.terms.html.html taxonomy/category.terms.en.html taxonomy/category.terms.html _default/terms.en.html.html _default/terms.html.html _default/terms.en.html _default/terms.html indexes/indexes.en.html.html indexes/indexes.html.html indexes/indexes.en.html indexes/indexes.html theme/taxonomy/category.terms.en.html.html theme/taxonomy/category.terms.html.html theme/taxonomy/category.terms.en.html theme/taxonomy/category.terms.html theme/_default/terms.en.html.html theme/_default/terms.html.html theme/_default/terms.en.html theme/_default/terms.html theme/indexes/indexes.en.html.html theme/indexes/indexes.html.html theme/indexes/indexes.en.html theme/indexes/indexes.html]
WARN 2018/01/18 11:43:02 [en] Unable to locate layout for "taxonomyTerm": [taxonomy/tag.terms.en.html.html taxonomy/tag.terms.html.html taxonomy/tag.terms.en.html taxonomy/tag.terms.html _default/terms.en.html.html _default/terms.html.html _default/terms.en.html _default/terms.html indexes/indexes.en.html.html indexes/indexes.html.html indexes/indexes.en.html indexes/indexes.html theme/taxonomy/tag.terms.en.html.html theme/taxonomy/tag.terms.html.html theme/taxonomy/tag.terms.en.html theme/taxonomy/tag.terms.html theme/_default/terms.en.html.html theme/_default/terms.html.html theme/_default/terms.en.html theme/_default/terms.html theme/indexes/indexes.en.html.html theme/indexes/indexes.html.html theme/indexes/indexes.en.html theme/indexes/indexes.html]

                   | EN
+------------------+----+
  Pages            |  7
  Paginator pages  |  0
  Non-page files   |  0
  Static files     |  0
  Processed images |  0
  Aliases          |  0
  Sitemaps         |  1
  Cleaned          |  0

Total in 31 ms
WARN 2018/01/18 11:43:02 Skip i18nDir: lstat /Volumes/SUPPORT/Workspace/OK/myapp/i18n: no such file or directory
Watching for changes in /Volumes/SUPPORT/Workspace/OK/myapp/{content,data,layouts,static}
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

There are some warnings about missing texonomy templates but i’m not sure how should i interpret them - they are crucial for my site to be built or not ?

Try renaming your about.html to about.md.

Still nothing :frowning:

If you link to your repo, one of us can just clone it and troubleshoot it directly, rather than ask 20 questions. :slight_smile:

Yeah that was the plan. There you go:

You’re going about this totally the wrong way, as I did! This is the video that gave me my a-ha moment:


title: “Checkout”

date: 2019-07-26T11:54:01-04:00

draft: false


if your draft is true, change it to false