tel*_*ect 3 jekyll github-pages
在我的每一篇 Jekyll 帖子中,我都在前面列出了一个数字:
---
minutes: X
---
Run Code Online (Sandbox Code Playgroud)
该值始终与 post-to-post 不同,我想找到所有帖子的总和。
不确定这是否可能或应该采用什么方法。
提前感谢您的任何帮助!
尝试:
{% assign total = 0 %}
{% for post in site.posts %}
{% assign total = total | plus: post.minutes %}
{% endfor %}
{{ total }}
Run Code Online (Sandbox Code Playgroud)