Hello !
It’s my first time here, and I don’t know jekyll a lot.
For some custom writing, I want to use codeblocks to write somethings as admonition. I create the CSS, the js to add html… But, I found one problem : jekyll doesn’t really run in codeblocks.
How can I force things to parse my markdown ? (latex, strong, link…)
For information : each code blocks start with ad- so it creates custom language.
(I don’t want to change the markdown source file).
!!! note
You should note that the title will be automatically capitalized.
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You should note that the title will be automatically capitalized.</p>
</div>
But indenting by 4 spaces in Jekyll will turn it into code snippet
You could try write your content in .html files instead of .md to avoid that processing.
Whether .md or .html you would still have to use pre tag to keep the white space
---
---
## Heading
<pre>
!!! note
My content
</pre>
Or… you can write your content in frontmatter where Jekyll won’t process it as Markdown
---
title: My title
my_content: |
My content goes here
Some notes
!!! note
My note
my_field: 123
---
{{ page.my_content }}
Or maybe like this. In your layout.
<pre>
{{ page.my_content }}
</pre>
Note that any markdown like ## **my heading** will be rendered as plain text. So you can add special characters and indentation with no issue.
You could apply a filter to apply markdown but then you’re back to where you started and defeats using frontmatter. But, for interest.
---
---
{{ page.my_content | markdownify }}
Also note that page.content is already a Jekyll thing, so I used an alternate name.