Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion pelican/plugins/yaml_metadata/yaml_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,23 @@ def read(self, source_path):
)
return super().read(source_path)

metadata = self._load_yaml_metadata(m.group("metadata"), source_path)

# Simulate markdown.extensions.meta's behavior
# of writing the markdown object's Meta attribiute
# Note this is not 1:1 (datetimes are reformatted)
self._md.Meta = {
k: (
[str(i) for i in v]
if isinstance(v, list) else
[str(v)]
)
for k, v in metadata.items()
}

return (
self._md.reset().convert(m.group("content")),
self._load_yaml_metadata(m.group("metadata"), source_path),
metadata,
)

def _load_yaml_metadata(self, text, source_path):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pelican-yaml-metadata"
version = "2.1.2"
version = "2.2.0"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The AutoPub-powered release process will automatically increment the version number and publish the new package to PyPI, which means manually incrementing like this will result in releasing version 2.3.0, with version 2.2.0 being skipped entirely. So this manual increment should be reverted.

description = "Pelican plugin for YAML-formatted Markdown metadata headers"
authors = [
{name = "Carey Metcalfe", email = "carey@cmetcalfe.ca"},
Expand Down
Loading