File tree Expand file tree Collapse file tree 4 files changed +15
-16
lines changed Expand file tree Collapse file tree 4 files changed +15
-16
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 88{%- if post.description -%}
99 {{- post.description -}}
1010{%- else -%}
11- {%- include no-linenos.html content=post.content -%}
11+ {% comment %}
12+ Remove the line number of the code snippet.
13+ {% endcomment %}
14+ {% assign content = post.content %}
15+
16+ {% if content contains '< td class ="rouge-gutter gl "> < pre class ="lineno "> ' %}
17+ {% assign content = content | replace: '< td class ="rouge-gutter gl "> < pre class ="lineno "> ', '<!-- <td class="rouge-gutter gl"><pre class="lineno">'%}
18+ {% assign content = content | replace: '</td><td class="rouge-code">', '</td> --> < td class ="rouge-code "> ' %}
19+ {% endif %}
20+
1221 {{- content | markdownify | strip_html -}}
1322{%- endif -%}
1423{%- endcapture -%}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ <h2><a href="{url}">{title}</a></h2>
1212 {tags}
1313 </ div >
1414 </ header >
15- < p > {snippet }</ p >
15+ < p > {content }</ p >
1616 </ article >
1717{% endcapture %}
1818
Original file line number Diff line number Diff line change @@ -5,16 +5,16 @@ swcache: true
55
66[
77 {% for post in site.posts % }
8+ {%- capture description -% }
9+ {% include post-description.html % }
10+ {%- endcapture -% }
811 {
912 "title" : {{ post.title | jsonify }},
1013 "url" : {{ post.url | relative_url | jsonify }},
1114 "categories" : {{ post.categories | join: ', ' | jsonify }},
1215 "tags" : {{ post.tags | join: ', ' | jsonify }},
1316 "date" : " {{ post.date }}" ,
14- {% include no-linenos.html content=post.content % }
15- {% assign _content = content | strip_html | strip_newlines % }
16- "snippet" : {{ _content | truncate: 200 | jsonify }},
17- "content" : {{ _content | jsonify }}
17+ "content" : " {{ description | newline_to_br | replace: '<br />', ' ' | strip_newlines }}"
1818 }{% unless forloop.last % },{% endunless % }
1919 {% endfor % }
2020]
You can’t perform that action at this time.
0 commit comments