html - 停止截断 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'}} </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>
任何帮助是极大的赞赏
解决方案
post.description
用于字体问题。在您的情况下,阅读更多链接到 post.url 是相关的帖子。在此处阅读有关真实摘录的更多信息:https ://jekyllrb.com/docs/posts/#post-excerpts
推荐阅读
- firebase - 使用 Flutter 在 Firebase 上设置自定义键
- azure-devops - Azure 构建管道 - 需要权限
- java - 使用 java.time.Duration (ISO 8601) 作为输入计算结束日期?
- android - Honor View 10手机上的android自适应启动器图标太大
- xml - 使用 MSXML 验证 XSD 架构时如何获取 *All* 错误
- flutter-web - 使用图像选择器以外的 pub 在 Flutter Web 上上传图像
- python - 查找给定循环的值
- terraform - 如何使用 Terraform 工作区在 aws 和 localstack 之间切换?
- javascript - wordpress 的 javascript 插件上的默认字体
- keras - 我如何在 lstm 中同时使用两个序列