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

Allow Pandoc to parse metadata rather than doing it in the plugin. #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zackw
Copy link
Contributor

@zackw zackw commented Mar 24, 2015

This involves a fairly complicated dance with a Pandoc "filter"
module in order to get all of the metadata to be visible in the
output, but means that all metadata formats supported by Pandoc
are available without the need for any additional Python modules.
It also means strings in metadata will be processed as Markdown.

This pull request is an alternative to #3, "Add support for YAML metadata." They achieve roughly the same effects but involve different design tradeoffs. Please decide which you like better, merge that one and reject the other one.

This involves a fairly complicated dance with a Pandoc "filter"
module in order to get all of the metadata to be visible in the
output, but means that all metadata formats supported by Pandoc
are available without the need for any additional Python modules.
It also means strings in metadata will be processed as Markdown.

NOTE: Thanks to jgm/pandoc#2026 and
backward compatibility constraints, this change defaults to
enabling 'mmd_title_block' and *disabling* 'pandoc_title_block' and
'yaml_metadata_block'.  Moreover, putting either +pandoc_title_block or
+yaml_metadata_block in PANDOC_EXTENSIONS will cause mmd_title_block to
be disabled.
@liob
Copy link
Owner

liob commented May 18, 2015

please see conversation in #5

@liob
Copy link
Owner

liob commented Jun 3, 2015

There seems to be an issue which prevents the correct parsing of MD metadata if the header contains certain characters such as "#".

failing sample: https://raw.githubusercontent.com/proven-inconclusive/proven-inconclusive.github.io/43f1ad615a6d2e949171b26e84f012a2e774b6db/content/entries/spearman_correlation_heatmap_with_correlation_coefficient_and_significance_in_r.md

I will look into this and get back to you.

@chriskrycho
Copy link

Looks like it's probably time to come back to this; @zackw, will you have time or motivation to tackle integrating the output from Pandoc? If not, I can do so, though it'll probably be mid-December before I get there. (Note that the change isn't in a release yet, but it is on master, so it should be in a release fairly soon.)

@liob, did you ever sort out the MD metadata # issue?

@zackw
Copy link
Contributor Author

zackw commented Nov 25, 2015

I probably won't have time to do anything with that until mid-December at the earliest, either, but I will do it eventually.

@choucavalier
Copy link

Any news about this @zackw?

@zackw
Copy link
Contributor Author

zackw commented Sep 26, 2016

I might work on this in the next couple weeks, but I can't make any promises.

@kdheepak
Copy link

The recent version of Pandoc allows for metadata extraction. As @chriskrycho commented (and @zackw probably already knows this, since he's the one that started the thread), one can do this using the meta-json argument and $meta-json template. I just thought I'd mention that maintaining a separate plugin to do basically the same thing. The reason I'm maintaining a separate plugin is because I'm experimenting with using Pandoc and Jupyter Notebooks for blogging. My previous approach used a filter for this, but I've now reverted to using code from liquid tag plugin. Once I make more headway on a cleaner modular approach, I'll consider submitting a pull request here.

@jaketangosierra
Copy link

Wanted to bump this a bit.

I'm trying to consolidate my publications list on my professional website through one bibtex file, and pandoc as as my markdown parser, and this feature would make my life much easier 😄

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

Successfully merging this pull request may close these issues.

6 participants