Today I've polished the blog a bit and found out some stuff.
I learned about the HTML5 <details> tag when I searched for a simple way to make collapsible code (which is great for illustrative purposes, but can get in the way of the main point you want to convey).
But I ran into some problems; The markdown inside the <details>
tag didn't render.
Some people suggested to add
markdown: kramdown
kramdown:
parse_block_html: true
to the _config.yml
file but this was bad!
This is to apply a global solution to a local problem, which is never the solution you want to try first.
I did try it, and it still made a big mess of things!
A little extra digging and I found out that you can do
{::nomarkdown}
<details>
<summary>This is an example</summary>
{:/nomarkdown}
```python
print("example yo")
```
{::nomarkdown}
</details>
<br>
{:/nomarkdown}
which just disables the markdown processor enough to let me add the raw html needed.
And hey, here is that exact demo!
This is an example
print("example yo")
Pretty neat.
Update 2022-03-27
I've gotten sick n tired of Jekyll and rolled my own shit inspired by thea.codes and heaps of problems are not problems anylonger.
The example above is now without the ugly nomarkdown
-wrapping and just works ™ but is no longer the exact same demo behind the scenes.
Anyway it's here for posterity or something ¯\_(ツ)_/¯
Chronological (or something ¯\_(ツ)_/¯ )
- Next: Windows Container notes
- Prev: HDL synthezis notes
- Next: Windows Container notes
- Prev: HDL synthezis notes