feat: truncate words for post page footer nav
This commit is contained in:
parent
d45f20b404
commit
bf7c0b1c50
1 changed files with 5 additions and 2 deletions
|
@ -21,13 +21,16 @@ sidebar:
|
||||||
|
|
||||||
<div class="post-nav">
|
<div class="post-nav">
|
||||||
{%- if page.previous -%}
|
{%- if page.previous -%}
|
||||||
<a class="previous" href="{{ page.previous.url }}" title="{{ page.previous.title | escape }}">{{ page.previous.title | escape }}</a>
|
<a class="previous" href="{{ page.previous.url }}" title="{{
|
||||||
|
page.previous.title | escape }}">{{ page.previous.title | escape |
|
||||||
|
truncatewords: 6 }}</a>
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
<span></span>
|
<span></span>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{%- if page.next -%}
|
{%- if page.next -%}
|
||||||
<a class="next" href="{{ page.next.url }}" title="{{ page.next.title | escape }}">{{ page.next.title | escape }}</a>
|
<a class="next" href="{{ page.next.url }}" title="{{ page.next.title |
|
||||||
|
escape }}">{{ page.next.title | escape | truncatewords: 6 }}</a>
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
<span></span>
|
<span></span>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
Loading…
Reference in a new issue