Closed McShelby closed 1 month ago
as I think a resource does not contain meta data
Page resources with ResourceType
“page” can contain front matter, which allows you to do something like this in a template:
{{ range .Resources.ByType "page" }}
<h3>{{ .Title }}</h3>
<h4>{{ .Params.subtitle }}</h4>
{{ .Content }}
{{ end }}
Page resources with ResourceType
“page” include Markdown, HTML, Emacs Org Mode, AsciiDoc, Pandoc, or reStructuredText (i.e., files with extension .md
, .html
, .org
, .adoc
, .pdc
, .rst
). See documentation for a complete list of extensions.
I think this issue should be closed. It works as designed.
Thanks Joe.
Page resources with ResourceType “page” can contain front matter
In case this means, front matter is optional, I would consider this a bug or at least a limitation.
If front matter is mandatory for page resources, I'll close the ticket.
Front matter is optional, but can't begin with a character that matches the characters in front matter delimiters: -
, +
, {
.
I don't see this changing, so you might open an issue in the docs repository.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Having a leaf bundle (
content/posts
) with Markdown resources (content/posts/res-1.md
) fails to build if beginning of Markdown contains certain characters.res-1.md
Most likely, it got interpreted as incomplete frontmatter.
This seems like a bug, as I think a resource does not contain meta data defined inside the resource itself.
Test repo: https://github.com/McShelby/hugo-testing/tree/hugo-issue-12855
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
The used version is the latest release.