首页 > 解决方案 > 停止截断 Jekyll

问题描述

我正在使用 jekyll 模板创建博客,目前所有帖子都被截断并带有阅读更多链接。我希望删除它并完全显示任何长度的帖子。

这是我的 index.html

---
layout: default
---

{% for post in paginator.posts %}
<article class="main-article">
  <div class="wrap-content">
    <header class="header-article">
      <h2 class="title-article"><a href="{{post.url | prepend: site.baseurl}}">{{post.title}}</a></h2>
      <div class="post-date"><span>{{post.date | date: '%Y, %b %d'}}&nbsp;&nbsp;&nbsp;&nbsp;</span></div>
    </header>
    {% if post.img %}
       <img class="post-image" src={{ "/assets/img/" | prepend: site.baseurl | append: post.img }} alt="{{post.title}}">
    {% endif %}
    <p>{{post.description}} <a class="more" href="{{post.url | prepend: site.baseurl}}">(Read more...)</a></p>
  </div>
</article>
{% endfor %}

<div class="pagination">
  {% if paginator.previous_page %}
    <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="previous"><i class="fa fa-chevron-left" aria-hidden="true"></i> Previous</a>
  {% else %}
    <span class="previous"><i class="fa fa-chevron-left" aria-hidden="true"></i> Previous</span>
  {% endif %}
  {% if paginator.next_page %}
    <a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="next">Next <i class="fa fa-chevron-right" aria-hidden="true"></i></a>
  {% else %}
    <span class="next ">Next <i class="fa fa-chevron-right" aria-hidden="true"></i></span>
  {% endif %}
</div>

任何帮助是极大的赞赏

标签: htmljekyll

解决方案


post.description用于字体问题。在您的情况下,阅读更多链接到 post.url 是相关的帖子。在此处阅读有关真实摘录的更多信息:https ://jekyllrb.com/docs/posts/#post-excerpts


推荐阅读