Sub directory pages not picked up

Hey folks! I am having a hard time to wrap my head around the Hugo concepts, I am sure the solution is simple, but I just don’t get it.

The repository is https://github.com/edsh/www-public/tree/initial-hugo (note the non-default branch).

The dir structure is (abridged)

├── README.md
├── config.toml
├── content
│   ├── _index.html
│   ├── datenschutzerklaerung.html
│   ├── flugplatz
│   │   ├── _index.md
│   │   ├── besucher.html
│   │   ├── bewirtung.html
│   │   ├── noise-areas-edsh.png
│   │   ├── piloteninfo.html
│   │   └── webcam.html
│   ├── impressum.html
│   ├── kontakt.html
│   └── verein
│       ├── _index.md
│       ├── flugzeuge.html
│       └── ueber-uns.html
├── data
├── public
│   ├── flugplatz
│   │   ├── index.xml
│   │   └── noise-areas-edsh.png
│   ├── index.html
│   ├── index.xml
│   ├── sitemap.xml
│   └── verein
│       └── index.xml

As you can see I wanted the .html files in content to be rendered, but they are not. Funnily I have a menu in layouts/partials/header/site-header.html which performs correctly, so somehow Hugo “sees” the .html files but doesn’t bother to publish them.

In a related note the menu renders the links like for example /flugplatz/webcams/ but I’d like it to be /flugplatz/webcams.html (i.e. not a “folder” but an actual HTML file). Is that possible?

Thanks and best!

-Adrian

// UPDATE: OK I got it, I overlooked the _Warning_s Hugo gave me and didn’t provide layouts for “single” and “section”; however I’d still like to know how I could end the leaf pages with .html and not /

The links you’re seeing are actually pointing to a HTML file, called index.html.

https://gohugo.io/content-management/urls/#ugly-urls

1 Like

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