Skip to content

Commit

Permalink
add support for another markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
qiujames committed Jul 7, 2023
1 parent 447e0c1 commit 1fc9fae
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions _includes/tablist_content
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}```
Expand Down
3 changes: 3 additions & 0 deletions _posts/2022-06-23-tabbed-content-in-mm.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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).
Expand Down
29 changes: 29 additions & 0 deletions _posts/tabbed_content/code.md
Original file line number Diff line number Diff line change
@@ -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!)
~~~

0 comments on commit 1fc9fae

Please sign in to comment.