1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

Code improvement.

Passing parameters to includes
This commit is contained in:
Cotes Chung
2020-07-22 21:41:49 +08:00
parent 562fcd4fd8
commit 209058b84a
7 changed files with 28 additions and 24 deletions

View File

@@ -36,15 +36,12 @@ layout: compress
<div id="main-wrapper">
<div id="main">
{% capture _content %}
{{ content }}
{% endcapture %}
{% include fixlinenos.html %}
{{ _content }}
{% include fixlinenos.html content=content %}
{% include footer.html %}
</div>
{% include search-results.html %}
</div> <!-- #main-wrapper -->

View File

@@ -58,9 +58,8 @@ layout: page
</div>
<div class="post-content">
<p>
{% assign _content = post.content %}
{% include no-linenos.html %}
{{ _content | markdownify | strip_html | truncate: 200 }}
{% include no-linenos.html content=post.content %}
{{ content | markdownify | strip_html | truncate: 200 }}
</p>
</div>