-
Notifications
You must be signed in to change notification settings - Fork 844
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
Replace pelican-md-metayaml with an updated version #382
Conversation
How is your updated version better? What is updated? The commit message seems pretty insufficient. Python-Markdown supports YAML metadata from version 2.6+, but Pelican is as of yet incompatible with it. |
I added more detailed information to the commit. The reason I started looking into this plugin is that it didn't work (for me anyway, it may have worked for others). In fixing it, I noticed that it was inheriting the I basically rewrote the plugin, taking out the pathing hacks, reusing functionality already built into the The plugin added as a submodule in this commit can be found here: https://github.com/pR0Ps/pelican-md-metayaml |
Since Python-Markdown 2.6 will support YAML metadata, it probably makes the most sense to build on top of that. @waylan: Do you think it might be possible to release 2.6 sooner rather than later? |
I'd be happy to hack the missing bits for seamless support in Pelican. From top of the head, I think the only two issues are:
|
I've submitted a pull request to the original project with these changes in it, hopefully it's accepted. I didn't submit one initially because in my experience, completely rewriting someones code and asking them to replace it doesn't usually go over well. When that pull request is accepted, I'll update this pull request to update to it instead. If Markdown is updated to 2.6+ and works properly with Pelican before then, this issue can just be closed. |
I expect that Python-Markdown 2.6 will be released relatively soon. Possibly within a week - time permitting. |
The pull request to the original project was accepted so I've updated this pull request to just update the plugin instead of replacing it with a different project. |
Thanks, Waylan. Looking forward to the release. And thanks for the plugin rewrite, Carey! |
Replace pelican-md-metayaml with an updated version
@justinmayer Looking forward to having Pelican 3.6 deferred by then or at least until the support is in there (working on it). |
FYI, I just released Python-Markdown 2.6. See the release notes. |
@waylan: Many thanks for releasing 2.6 within 24 hours of my request. You rock! 👍 @kernc: Are you working on support for YAML-based metadata for Markdown in Pelican? That's how I interpreted your comment above, but I didn't want to assume as much. (^_^) Let me know either way, as I'm trying to plan the schedule for the Pelican 3.6 release. Thanks! |
Python-Markdown>=2.6 and its meta extension supports YAML headers and optional `yaml` switch which, when used, parses data with PyYAML and hence a wee bit different metadata object gets provided. Related: getpelican/pelican-plugins#382
@justinmayer, I absolutely am/have been. It just took a little longer than first expected as something more urgent came up. Here's an attempt: getpelican/pelican#1636 Also can look into migrating the 2.6-introduced deprecations if that'd be desirable. |
FYI, you guys might want to see the discussion going on here before going any further with using the built-in meta-data extension for YAML support. |
~~Python-Markdown>=2.6 and its meta extension supports YAML headers and optional `yaml` switch which, when used, parses data with PyYAML and hence a wee bit different metadata object gets provided.~~ Not anymore. YAML is supported by python-markdown-yaml-meta-data extension which uses PyYAML, which returns parsed lists of strings instead of raw strings, datetime objects instead of string date representations etc. Pelican needed only slight adjusting, and now support Jekyll-like YAML headers with aforementioned Markdown extension. Related: * https://github.com/teoric/python-markdown-yaml-meta-data * getpelican/pelican-plugins#382 * Python-Markdown/markdown#390 (comment)
Replaces the pelican-md-metayaml plugin with an updated fork of it.