Description
Bounced over from the go-org
parser for Hugo.
For Org mode files that can be used with Hugo, at the moment, the frontmatter block of #+KEY: VALUE needs to reside at the top of the page in order to be picked up by Hugo.
However, a lot of people have Properties at the top of their files. In particular, a lot of people use org-roam
which generates a properties block at the top of the file to link files and many use org-roam to generate content for blog posts, which requires a
:PROPERTIES:
:ID: {hash}
:END:
at the top of the page in order for it to be findable and linkable by org-roam
It would be great if Hugo could support/ignore the PROPERTIES block at the top of a file (from an org-mode perspective it should), then followed by the KEY Value front matter so this could be ln -s
directly to the content/posts directory in Hugo so that the following could work (taken directly from my org-roam template for blog posts.
:PROPERTIES:
:ID: {hash}
:END:
#+LAYOUT: post
#+TITLE: ${title}
#+PERMALINK: /${slug}
#+DATE: %<%Y-%m-%d>-Thh:mm:ss+07:00
#+LOCATION: Ao Nang
#+TAGS[]: tag1 tag2
#+DESCRIPTION: 'Clever description of contents.'
#+DRAFT: true
Niklas mentioned:
hugo only sends the part of the document it considers frontmatter
(i.e. all lines starting with #+ at the top of the file) to go-org for parsing.I think lexFrontMatterOrgMode
would need to be changed for your request