Page disappears from menu when changed from .md to .html

I am building a site where the only consistent items are the header and footer. As a result, I need to write a lot of custom HTML for each page and the Markdown language is getting in the way of my coding style and environment

I would like to change the content file type from markdown to HTML. I have tried changing an existing file’s extension from .md to .html and the page content works as expected. The issue I am having is the page is no longer included in the main menu.

Questions:

  • Is this possible
  • Should I expect HUGO to treat html files and their frontmatter the same as it does markdown files?
  • Does frontmatter in an html file need to be written in a specific language (yaml, toml, json)
  • Do I need to make any changes to my config.yaml file?

Here is an example of the frontmatter I am using in both file types

---
title: "Contact Us"
date: 2021-11-23T21:18:08+11:00
draft: false
subtitle: My awesome sub title
menu:
main:
parent: support
weight: 10
---

The indentation on your YAML is wrong, or you need to edit your post.

Wow!

an hour or so of searching and it was so simple to fix.

My YAML got flattened by my HTML formatter. It should have looked like this.

---
title: "Contact Us"
date: 2021-11-23T21:18:08+11:00
draft: false
subtitle: My awesome sub title
menu:
  main:
    parent: support
    weight: 10
---

Thank you so much

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