File tree Expand file tree Collapse file tree 4 files changed +16
-17
lines changed Expand file tree Collapse file tree 4 files changed +16
-17
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 8
8
{%- if post.description -%}
9
9
{{- post.description -}}
10
10
{%- else -%}
11
- {%- include no-linenos.html content=post.content -%}
12
- {{- content | markdownify | strip_html -}}
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
+
21
+ {{- content | markdownify | strip_html | newline_to_br | replace: '< br /> ', ' ' | strip_newlines -}}
13
22
{%- endif -%}
14
23
{%- endcapture -%}
15
24
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ <h2><a href="{url}">{title}</a></h2>
12
12
{tags}
13
13
</ div >
14
14
</ header >
15
- < p > {snippet }</ p >
15
+ < p > {content }</ p >
16
16
</ article >
17
17
{% endcapture %}
18
18
Original file line number Diff line number Diff line change @@ -5,16 +5,16 @@ swcache: true
5
5
6
6
[
7
7
{% for post in site.posts % }
8
+ {%- capture description -% }
9
+ {% include post-description.html % }
10
+ {%- endcapture -% }
8
11
{
9
12
"title" : {{ post.title | jsonify }},
10
13
"url" : {{ post.url | relative_url | jsonify }},
11
14
"categories" : {{ post.categories | join: ', ' | jsonify }},
12
15
"tags" : {{ post.tags | join: ', ' | jsonify }},
13
16
"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 }}"
18
18
}{% unless forloop.last % },{% endunless % }
19
19
{% endfor % }
20
20
]
You can’t perform that action at this time.
0 commit comments