I want to put md files in a collection _notes, but group them in folders. A big html of a topic will be generated from multiple md files.
Here is my attempt
_notes
├-database.md
└-compiler.md
_note_sections
├-database
| ├-indexing.md
| └-concurrency.md
└-compiler
├-assembly.md
└-parsing.md
-layouts
├-note.html
└-note_section.html
Each md file in _notes_sections stores the actual content and has layout note_section e.g.
---
section_title: xxx
layout: note_section
---
Testing text
{% highlight python %}
dfs_r(Node n, MBR w)...
{% endhighlight %}
Each md file in _notes combines multiple note_sections by showing them from expandible arrows and has layout note, here is the layout file note.html:
---
layout: default
---
{% include mathjax.html %}
{% assign subfolder = 'compiler/' %}
<ul class="note_sections">
{% for note_section in site.note_sections %} {% if note_section.relative_path contains subfolder %}
<li>
<details>
<summary>{{note_section.section_title}}</summary>
{{note_section.content}}
</details>
</li>
{% endif %} {% endfor %}
</ul>
while note_section.html is simply
---
layout: default
---
{{content}}
However, when generating the html into _site/notes, the compiler.html simply has the raw markdown content
.
.
.
<li>
<details>
Testing text
{% highlight python %}
dfs_r(Node n, MBR w)...
{% endhighlight %}
</details>
</li>
.
.
.
instead of turning the note_section markdowns into html which would turn the code snippet in markdown into these long html tags
<figure class="highlight"><pre><code class="language-python" data-lang="python"><span class="nf">
However, I do get a _site/note_sections/compiler/assembly.html file with the correct html generated from the note_section markdown. It is what I want to put inside the big topic html under notes, not just put the raw markdown inside.