-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable metadata keys and values to be modified (#39)
This change introduces two new `Modifier.Target` instances: `metadataKeys` and `metadataValues`, which can be used to customize how Ink parses metadata. This in turn enables Publish plugins to be written that bridges the gap between Publish’s built-in metadata format and that of external tools, such as other static site generators or CMSs.
- Loading branch information
1 parent
c88bbce
commit a9a1a01
Showing
4 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a9a1a01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this, but as I get a better grasp of what's going on here I wonder if this is the best, most powerful way to deal with decoding different formats of metadata. I sure wouldn't want to create a plugin that parses YAML formatted metadata only to regurgitate it into strings that the Publish
MarkdownMetadataDecoder
will understand. Wouldn't it be cool if we could designate the decoder to use, possibly as a custom publish pipeline parameter? The custom decoder would then simply be fed the full string for all the custom metadata. This way, it would be trivial (or at least it appears that it would be) to use a decoder like Yams for YAML metadata.What do you think?