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

Support YAML front-matter metadata #599

Open
rclement opened this issue Sep 26, 2021 · 3 comments
Open

Support YAML front-matter metadata #599

rclement opened this issue Sep 26, 2021 · 3 comments

Comments

@rclement
Copy link
Contributor

When using MkDocs, we have the possibility of putting extra article metadata in a YAML front-matter at the top of the Markdown document. This allows for custom formatting, such as selecting the template to use, etc.

When trying the same thing with a Jupyter Notebook, the top YAML front-matter is rendered as any Markdown cell and not picked up by MkDocs as such.

Here is a scenario in action:

I try digging nbconvert documentation but could not find anything relevant nor enabling a workaround. The only thing that seems to be working is using the MarkdownExporter but mknotebooks uses the HTMLExporter.

Any ideas?

@rclement
Copy link
Contributor Author

A quick follow-up. In the following issue referring to adding a blog feature in mkdocs-material, @timvink mentioned mknotebooks being up for the task: squidfunk/mkdocs-material#3353 (comment)

As stated in this issue, mknotebooks does not support YAML front-matter metadata in the first notebook cell.

@greenape is there any reason mknotebooks uses internally the "HTMLExporter" instead of the "MarkdownExporter" from nbconvert?

@timvink
Copy link
Contributor

timvink commented Dec 29, 2021

+1. If we're going to get blog support improved in mkdocs, this feature would make sense!

@greenape would you be interested in investigating this and picking this up? If not, do you agree on the direction and would you be open to contributors?

@greenape
Copy link
Owner

Contributions are very welcome! (I don't have a lot of time to work on this at the moment.)

Did originally use the markdown exporter for this, but at the time it was rather less capable than the html one especially when dealing with widgets etc. (May no longer be the case, I haven't checked)

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

No branches or pull requests

3 participants