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

Import and reuse metadata from other files #924

Open
Zekt opened this issue Mar 11, 2022 · 1 comment
Open

Import and reuse metadata from other files #924

Zekt opened this issue Mar 11, 2022 · 1 comment
Labels

Comments

@Zekt
Copy link

Zekt commented Mar 11, 2022

Does there exist a way to import files in the metadata of a file, such that we can have global contexts with reusable metadata?

I have implemented a field in Hakyll.Web.Template.Context that checks if there is a key "import" in the metadata. If it is presented, the metadata in the given file is put in the context (by exploiting loadMetadataFile in Hakyll.Core.Provider.Metadata, which should be exported).

I will create a pull request if it is a good idea.

@Minoru
Copy link
Collaborator

Minoru commented Mar 12, 2022

This makes sense to me. Note that loadMetadataFile doesn't track dependencies — I guess you have a wrapper that ameliorates this? Anyway, I'd be glad to review your PR!

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

No branches or pull requests

2 participants