Jekyll 页面评分计算器,带有来自 Front Mater 区域的元数据

Jekyll page rating calculator with meta from Front Mater area

我正在使用以下代码编辑 include/span 伪装成 "Jekyll page rating calculator with meta from Front Mater area" 但似乎某些语法缺少额外的 heading/lines 让计算显示在左下圆引号中.现在没有价值

See the sampl page

<span class="indexmod">
{% assign number_of_words = content | strip_html | number_of_words %}
{% assign social = page.facebook | plus: page.instagram %}

{% comment %}Two lines for readability, but can be chained on one line{% 
endcomment %}
{% assign Indexmod = social | times: page.age | divided_by: 1000000.0 %}
{% assign Indexmod = Indexmod | times: number_of_words | divided_by: 100 
 %}
{% endunless %}
 </span>

这不起作用的原因有两个:

  • 此包含中的 {% endunless %} 缺少匹配的 unless 子句。添加一个或删除 endunless 行。
  • Indexmod 的值未打印。您可以在计算完成后添加 {{ Indexmod }}