diff options
author | jeffreytse <jeffreytse.mail@gmail.com> | 2020-07-16 12:10:42 +0800 |
---|---|---|
committer | jeffreytse <jeffreytse.mail@gmail.com> | 2020-07-16 12:10:42 +0800 |
commit | bf7c0b1c505364582c030ffb14b3b3827e999da8 (patch) | |
tree | e1a7a6432ff7d8d4f607c79117c980c7dd59268d /_layouts/post.html | |
parent | d45f20b404899e4f4d4e9a2c005fd951589b5499 (diff) |
feat: truncate words for post page footer nav
Diffstat (limited to '_layouts/post.html')
-rw-r--r-- | _layouts/post.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/_layouts/post.html b/_layouts/post.html index 9195f13..364b76c 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -21,13 +21,16 @@ sidebar: <div class="post-nav"> {%- 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 -%} <span></span> {%- endif -%} {%- 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 -%} <span></span> {%- endif -%} |