diff --git a/_includes/tablist_content b/_includes/tablist_content index 7188aa5..05d1ab8 100644 --- a/_includes/tablist_content +++ b/_includes/tablist_content @@ -4,6 +4,9 @@ markdown="1" style="display:{{ include.display }}" > +{% if tab.content_md %} +{% include_relative tabbed_content/{{ tab.content_md }} %} +{% endif %} {% if tab.code_content %} ```{% if tab.language %}{{ tab.language }}{% endif %} {{ tab.code_content }}``` diff --git a/_posts/2022-06-23-tabbed-content-in-mm.md b/_posts/2022-06-23-tabbed-content-in-mm.md index 244c637..3bd035a 100644 --- a/_posts/2022-06-23-tabbed-content-in-mm.md +++ b/_posts/2022-06-23-tabbed-content-in-mm.md @@ -11,6 +11,8 @@ hello-world-tablist: can add text that is also formatted in **markdown**. You can add [links](https://qiujames.github.io/) or even images! ![birdie!](/assets/images/favicon.ico) + - title: Another Markdown + content_md: code.md - title: Java language: java code_content: | @@ -131,6 +133,7 @@ tablist: - title: Java... ``` + Indentation matters! The YAML Front Matter expects one level of indentation after the `|` character (to indicate multiline front matter content). diff --git a/_posts/tabbed_content/code.md b/_posts/tabbed_content/code.md new file mode 100644 index 0000000..e71439a --- /dev/null +++ b/_posts/tabbed_content/code.md @@ -0,0 +1,29 @@ +```python +print("Python Code from Another Markdown File :)"); +``` + +You can add markdown content through a specified file now! + +Since the {% raw %}`{% include %}`{% endraw %} tag +oesn't go through the necessary liquid front matter +preprocessing that Jekyll normally does, nested +tab lists aren't supported. + +Here's what the code.md that's generating this text looks like (kinda meta!) + +~~~md +# code.md + +```python +print("Python Code from Another Markdown File :)"); +``` + +You can add markdown content through a specified file now! + +Since the {% raw %}`{% include %}`{% endraw %} tag +oesn't go through the necessary liquid front matter +preprocessing that Jekyll normally does, nested +tab lists aren't supported. + +Here's what the code.md that's generating this text looks like (kinda meta!) +~~~ \ No newline at end of file