Replies: 5 comments 4 replies
-
There's isn't a generic solution. But specific to your usecase, there something already available: Search for "auto_set" on https://ox-hugo.scripter.co/doc/dates/. |
Beta Was this translation helpful? Give feedback.
-
Doesn't that set lastmod to the current time? I want to set it to the file's mtime. I export all my notes in batch, not only those that have changed. So with
I know, I was wondering if one should be added. |
Beta Was this translation helpful? Give feedback.
-
This works. Subtree based flow
File based flow
|
Beta Was this translation helpful? Give feedback.
-
This is also possible: Org setup file
|
Beta Was this translation helpful? Give feedback.
-
I've arrived at the following fully programatic way that doesn't require any changes to the Org files themselves:
|
Beta Was this translation helpful? Give feedback.
-
Would it be possible to have a hook or callback that let's us insert custom Hugo front matter at the time of export? Concretely, I want to set
lastmod
to the modification time of the Org file (using "one post per Org file") without having to materialize it in the Org file's front matter.Such a hook could be used for other computable front matter, too. For example, one could set the section based on the file name.
One possible API would be a configurable callback, that takes the Org buffer as input and returns a list of key/value pairs of Hugo front matter to insert.
Beta Was this translation helpful? Give feedback.
All reactions