Importing trees of md files into a Hugo project?

#1

I’d like to use Hugo to render a tree of Markdown files. Let’s assume that it looks like:

AT_Cat/
| _index.md
| Produce/
| _index.md
| | Fruit/
| | | _index.md
| | | Bananas.md

However, when I create this sort of tree under my content directory, the server responds with 404 nastygrams to my queries. Is there some special way to import a directory tree and then access its rendered content?

#2

Hi @Rich_Morin, if the markdown files have the expected frontmatter format, then I don’t see a reason it would not work. As for your problem, I can guess it’s just your not having the right templates in place. Let us see your source and use --verbose on hugo server and paste the error.

See also Requesting Help

#3

It turns out that I had more than one problem. First, I was using uppercase letters in the file and directory names. It appears that Hugo dislikes this, so I reverted to lowercase. Also, killing off and recreating a content subtree occasionally seems to confuse the server, so I restart it (and refresh the browser page) as needed.

-r