Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-populate dateModified metadata from file info #278

Open
jenshalm opened this issue Apr 24, 2022 · 0 comments
Open

Auto-populate dateModified metadata from file info #278

jenshalm opened this issue Apr 24, 2022 · 0 comments
Milestone

Comments

@jenshalm
Copy link
Contributor

Laika supports setting a datePublished and dateModified attribute under the laika.metadata key in configuration headers in markup documents. Both of these values currently need to be set manually. There is an option to auto-populate the dateModified value from file system info, but this is at least beyond the scope of the 0.19 series, which is why it's currently in the backlog. Reasons for not doing it in 0.19 are:

  • The implementation is non-trivial as the information needs to be routed all the way from InputTreeBuilder to ParserRuntime and there is no obvious way to do that. Potential future implementations should try to avoid hard-coding a single, specific feature for this data transfer and think about a generic approach (e.g. passing a Config instance through these layers which could be used for other functionality in the future).

  • Secondly, the existing manual support is already a good option for most common cases. In my personal view it's actually a better option, because, while being mildly inconvenient, it gives the user more control: if you just added a comma, it is not a meaningful change that should be surfaced to the user and to search engines. That does not mean this is never going to happen, it just means that I see it as somewhat low-value, combined with high-effort described in the previous bullet, so it's something for 0.20 or 1.0, or whatever happens after 0.19.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant