Skip to content

Commit 1fc9fae

Browse files
committed
add support for another markdown
1 parent 447e0c1 commit 1fc9fae

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

_includes/tablist_content

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
markdown="1"
55
style="display:{{ include.display }}"
66
>
7+
{% if tab.content_md %}
8+
{% include_relative tabbed_content/{{ tab.content_md }} %}
9+
{% endif %}
710
{% if tab.code_content %}
811
```{% if tab.language %}{{ tab.language }}{% endif %}
912
{{ tab.code_content }}```

_posts/2022-06-23-tabbed-content-in-mm.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ hello-world-tablist:
1111
can add text that is also formatted in **markdown**.
1212
You can add [links](https://qiujames.github.io/) or even images!
1313
![birdie!](/assets/images/favicon.ico)
14+
- title: Another Markdown
15+
content_md: code.md
1416
- title: Java
1517
language: java
1618
code_content: |
@@ -131,6 +133,7 @@ tablist:
131133
- title: Java...
132134
```
133135
136+
134137
Indentation matters! The YAML Front Matter expects
135138
one level of indentation after the `|` character
136139
(to indicate multiline front matter content).

_posts/tabbed_content/code.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
```python
2+
print("Python Code from Another Markdown File :)");
3+
```
4+
5+
You can add markdown content through a specified file now!
6+
7+
Since the {% raw %}`{% include %}`{% endraw %} tag
8+
oesn't go through the necessary liquid front matter
9+
preprocessing that Jekyll normally does, nested
10+
tab lists aren't supported.
11+
12+
Here's what the code.md that's generating this text looks like (kinda meta!)
13+
14+
~~~md
15+
# code.md
16+
17+
```python
18+
print("Python Code from Another Markdown File :)");
19+
```
20+
21+
You can add markdown content through a specified file now!
22+
23+
Since the {% raw %}`{% include %}`{% endraw %} tag
24+
oesn't go through the necessary liquid front matter
25+
preprocessing that Jekyll normally does, nested
26+
tab lists aren't supported.
27+
28+
Here's what the code.md that's generating this text looks like (kinda meta!)
29+
~~~

0 commit comments

Comments
 (0)