HUGO

Markdown files not being shown

Dear all,

I have created a website using Hugo and built my own theme. Several of my content pages are markdown files, and I’m displaying a preview of them on the main index page:

The previews all work fine, with titles and images being displayed correctly, but when I click on the “learn more” link underneath the small preview, I get a blank page, with only the header and footer partials displayed:

I have no idea why this is: the permalinks seem correct, I’ve tried modifying the baseURL, playing around with various settings in the config.toml and _index.md files, all to no avail. Can anyone help? The code can be found here.

Thanks for your help! I’ve only been using Hugo for a week, so I’m fairly new.

Thomas

Hello Thomas,

The content files under /featured/ all have type: feature set in their frontmatter.

In Hugo feature is not the same as featured.

Therefore said content files do not use the template under themes/utopia/layouts/featured/single.html but instead default to layouts/_default/single.html which is an empty template.

That is why these pages are rendered empty.

To fix change the type parameter of the above content files to featured.

Awesome, that fixed it! Many thanks!

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