New section is a 404

I am using the reveal.js theme and am having trouble getting sections to work.

My sample project source is here: https://github.com/robertmarkbram/hugo-sample

I have added another section. This is the layout of my content directory:

$ tree content/
content/
|-- _index.md
`-- SectionTest
    `-- _index.md

1 directory, 2 files

But the new section gives me a 404:

$ curl http://localhost:1313/SectionTest
404 page not found

The default page has content: http://localhost:1313

And this is what I see when I start my server:

$ hugo server
Building sites … WARN 2019/04/25 17:43:30 found no layout file for "HTML" for "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/04/25 17:43:30 found no layout file for "HTML" for "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

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

Total in 496 ms
Watching for changes in C:\Users\robert.bram\work\Hugo\hugo-sample\{content,data,layouts,static,themes}
Watching for config changes in C:\Users\robert.bram\work\Hugo\hugo-sample\config.toml
Environment: "development"
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

Is this an issue about the layout folder?

Rob
:slight_smile:

Hi,

By default Hugo is configured to disablePathToLower = false. This means that content/SectionTest/_index.md will be found at localhost:1313/sectiontest/.

You can configure disablePathToLower = true in your config.toml if you want it to be published to /SectionTest/ instead.

https://gohugo.io/getting-started/configuration/#all-configuration-settings

4 Likes

Thank you… that’s one puzzle out of the way!

1 Like