On my journey to learn more about writing with the new MyST engine, I built upon my recent update to my blog infrastructure and made some improvements to my blog post list. Here’s what it looks like now:
Click here to see how it looks now
Some quick thoughts on moving from Twitter/X to BlueSky and how I'll try to use social media after being burned once by Twitter.
On my journey to learn more about writing with [the new MyST engine](https:///mystmd.org), I built upon [my recent update to my blog infrastructure](./programmatic-myst-with-jupyter.md) and made some improvements to my blog post list. Here's what it looks like now: ````{note} Click here to see how it looks now :class: dropdown ```{postlist} :number: 3 ``` ```` Here's a quick rundown
While I've been [converting my blog to use the new MyST engine](./mystmd-with-the-blog.md), I discovered a useful MyST feature. It's not yet possible to [natively parse Jupyter Markdown outputs as MyST](https://github.com/jupyter-book/mystmd/issues/1026) but there's a workaround if you don't mind generating a temporary file. The trick is to _write to a temporary file_
Here’s a quick rundown of what I’ve improved.
Use the MyST sandbox to determine what AST to generate¶
I realized that MyST cards are a first-class citizen in the AST, meaning that I should be able to generate them directly with my Python plugin. These look a lot nicer than a list of bullet points.
However, generating MyST AST from scratch is cumbersome, so I headed over to the MyST sandbox to quickly see what the AST needed to look like for card outputs.
With this in mind, I simply modified my blogpost Python script to generate AST like the above rather than the bulleted list I was generating before.
Generating output manually with MyST AST takes some getting used-to, but the sandbox-based workflow above helps a lot. I think it’ll be way nicer once we can do this programmatically with Jupyter cells, here’s the issue tracking parsing cell outputs as MyST and this one specifically about generating AST from notebook cells.