Pages inside directories are not rendering

I have page in a subdirectory of the content directory:

  • content
    • faq
      • question. en. md

The problem is that the question.en.md is not rendered at all. For test purpose I put inside the question.en.md this content:

title: "Some Question"
date: 2017-10-11T14:37:32+02:00
draft: false
menu:
main:
name: question
weight: 10

Question content

The link in navigation is rendered correctly, it points to http://localhost:1313/en/faq/question as expected, but the URL displays
404 page not found

This is very strange for me because those pages are accessible with $.Site.Pages.

What is more strange that the faq directory is created with the index.xml file which also contains the title of that page and the link mentioned above but still, the page itself is not saved.

If you put your site’s code online I will check it out and see what’s up. And check you have a template in place for that page.

Also, regarding the links from file names:

Thanks for the hint. It was problem with a missing template. It’s just strange that HUGO doesn’t warn about missing HTML file but still it generates links and RSS’s.

It is not. Sometimes you don’t want a set of default templates to be checked for errors, because not everyone is using Hugo the same way as you are. I’ve had at least three scenarios where I didn’t want to render a piece of content using a standard single.html template.

The design of Hugo is to run through a template lookup order. If you want to throw an error, build it into your template. :slight_smile: