Hello,
I created a new site and dropped a bunch of markdown documents in the content folder assuming that, without any layouts or themes, Hugo will make a best effort to generate a site. In fact, it just rendered warnings, not any errors. But none of the markdown documents were transformed.
So I did some experiments:
- I added a baseof.html and still nothing changed. See repository.
- I then added a single.html and only the
index.md
was transformed to html, notpage1.md
orpage2.md
. See repository. - Only when I renamed
index.md
to_index.md
, wherepage1.md
andpage2.md
rendered to HTML. See repository.
My expectation was that if I did the following:
- run
hugo new site
- drop markdown documents from elsewhere into the content directory
- run
hugo
That:
- in the absence of any layouts/themes Hugo will render markdown files to HTML without any layout (similar to pandaoc); the layouts are additive. Browsers don’t really require the boilerplate.
- if there is a
single.html
, that I do not have to renameindex.md
to_index.md
in order to renderpage1.md
orpage2.md
when those files exist in the root. - If a page can’t be rendered, due to missing layouts, or empty layout files, then we should have an error by default, not silently fail.
I understand that the intent is probably for the site owner to use some theme, or some layouts to have a fully functional website; and functional is in the eye of the beholder. Layouts and themes are not strictly necessary to have a working site.
Not really asking for a solution here (that is evident from the experiments); just wondering if the fact that page1.md and page2.md wasn’t transformed is a defect or not, and in the absence of a theme/layout, whether Hugo should transform the markdown to HTML similar to the manner in which pandoc does conversion.