Jekyll Styles不能在localhost:4000或我的Github上呈现,任何人都可以提供建议吗?

时间:2016-11-27 09:16:32

标签: styles localhost github-pages jekyll-bootstrap

我正在使用Jekyll Bootstrap为我的博客。我已经用Ruby和RoR编写了一段时间。我设法在Github Pages(https://mukunzichild.github.io)上托管我的应用程序。但是正如您所看到的,CSS样式(Bootstrap 3)不会呈现。

我在谷歌搜索过但没想出来。有些人在使用版本3的Jekyl样式时遇到了问题,但它与我的不一样。

我甚至克隆了Jekyll bootstrap repo,它只在我本地运行时触发HTML。我没有更改默认文件中的任何内容。

如果我在这里遗失了什么,请告诉我。

1 个答案:

答案 0 :(得分:1)

这是一个Jekyll Bootstrap问题(see issue here)。

您可以通过以前的代码更改 _includes / JB / setup 中的错误代码来解决此问题:

{% capture jbcache %}
  <!--
  - Dynamically set liquid variables for working with URLs/paths
  -->
  {% include JB/is_production %}
  {% if site.JB.setup.provider == "custom" %}
    {% include custom/setup %}
  {% else %}
    {% if is_production 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 %}