-
Notifications
You must be signed in to change notification settings - Fork 53
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
feat: execute markdown with jupytext frontmatter #216
Conversation
Yeah thats the one question I had how to differentiate files, and I like that you need to specify the kernel. that makes it explicit. Can you add a test with a regular markdown file (no jupytext) too see what happens? |
that's a good question that I don't have an immediate (knowledgeable) answer for. I can say empirically that it seems to work fine with tests here and the repo i'm actually working on that motivated this PR... but i haven't yet looked yet for the exact line in mkdocs that would clarify why it works |
Ok, this looks good to me! I will hold merging of until I read a bit more about how mkdocs handles that case so we know if this has any unexpected consequences 🙈 . I will try to do that soon. So we dont render the |
yep, good idea. I may have time today as well. Will update if I learn more |
ok, here's what I've learned: as per the mdocs Page Events docs:
(as I'm sure you know :)) with this PR, >>> jupytext.read(page.file.abs_src_path).get('metadata')
{'jupytext': {'main_language': 'javascript', 'notebook_metadata_filter': '-all', 'cell_metadata_filter': '-all', 'text_representation': {'extension': '.md', 'format_name': 'markdown'}}} there is no |
@tlambert03 @danielfrg I did a short review and this is looking great. Many thanks to both of you. :D |
Ok, this looks good to me then. THank you for the PR and the research! |
I will try to get this out later today :) |
✅ Preview deployment
|
Thanks a bunch @danielfrg |
Just released version 0.25.0 with this PR. Thanks! |
Thank you! |
closes #215.
@danielfrg, here is a simple implementation supporting markdown files. As mentioned in #215, the biggest question for me is how best to cleanly add support for markdown files with jupytext frontmatter without causing any issues with "regular" markdown files that don't represent notebooks.
let me know if you have any thoughts
also, if you'd rather not check those two duplicated files for tests, we can probably create them as fixtures using jupytext to convert one of the other files