【发布时间】:2014-07-13 21:10:47
【问题描述】:
我正在使用Jekyll Bootstrap。而且我可以发布一篇文章,但是我不知道为什么帖子模板在每个帖子降价文件中都放置了{% include JB/setup %}。我对 ruby 和 Jekyll 知之甚少。但是我检查了一些文件,我可以理解一些代码。但我还是不知道这是什么意思:
{% capture jbcache %}
<!--
- Dynamically set liquid variables for working with URLs/paths
-->
{% if site.JB.setup.provider == "custom" %}
{% include custom/setup %}
{% else %}
{% if site.safe and site.JB.BASE_PATH and site.JB.BASE_PATH != '' %}
{% assign BASE_PATH = site.JB.BASE_PATH %}
{% assign HOME_PATH = site.JB.BASE_PATH %}
{% else %}
{% assign BASE_PATH = nil %}
{% assign HOME_PATH = "/" %}
{% endif %}
{% if site.JB.ASSET_PATH %}
{% assign ASSET_PATH = site.JB.ASSET_PATH %}
{% else %}
{% capture ASSET_PATH %}{{ BASE_PATH }}/assets/themes/{{ page.theme.name }}{% endcapture %}
{% endif %}
{% endif %}
{% endcapture %}{% assign jbcache = nil %}
我已经检查了这个question。我仍然很困惑。所以这是我的问题:
- 为什么我应该在 Jekyll bootstrap 的每个帖子中添加 {% include JB/setup %}?
- 我可以修改模板以删除每个帖子中的 {% include JB/setup %} 吗?
【问题讨论】: