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:
12
_includes/no-linenos.html
Normal file
12
_includes/no-linenos.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% comment %}
|
||||
Remove line numbers from code snippets.
|
||||
v2.2
|
||||
https://github.com/cotes2020/jekyll-theme-chirpy
|
||||
© 2020 Cotes Chung
|
||||
Published under the MIT License
|
||||
{% endcomment %}
|
||||
|
||||
{% if _content contains '<td class="rouge-gutter gl"><pre class="lineno">' %}
|
||||
{% assign _content = _content | replace: '<td class="rouge-gutter gl"><pre class="lineno">', '<!-- <td class="rouge-gutter gl"><pre class="lineno">'%}
|
||||
{% assign _content = _content | replace: '</td><td class="rouge-code">', '</td> --><td class="rouge-code">' %}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user