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

Remove line number from post snippet (#51).

Involves:
- Home page
- relate posts
- search results
- feed
This commit is contained in:
Cotes Chung
2020-05-06 00:39:28 +08:00
parent 3f843f010a
commit ac9dc4d9ac
5 changed files with 25 additions and 4 deletions

View File

@@ -10,7 +10,9 @@ layout: compress
"categories": "{{ post.categories | join: ', '}}",
"tags": "{{ post.tags | join: ', ' }}",
"date": "{{ post.date }}",
"snippet": "{{ post.content | strip_html | strip_newlines | remove_chars | escape | truncate: 300 | replace: '\', '\\\\' }}"
{% assign content = post.content %}
{% include no-linenos.html %}
"snippet": "{{ content | strip_html | strip_newlines | remove_chars | escape | truncate: 300 | replace: '\', '\\\\' }}"
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]