1

我正在为 Octopress 使用Slash 主题

现在,整个页面的左栏中只有日期戳,中间有帖子。

在我的_config.yml中,我已经尝试了这两个:

default_asides: [asides/about.html]

和这个:

default_asides: [custom/asides/about.html]

我有那个文件在我的source/_includes/custom/asides/

但它根本没有表明这一点。

这是那个的内容about.html

<section>
  <h1>About Me</h1>
  <p>A little something about me.</p>
</section>

想法?

4

1 回答 1

1

我正在使用一个名为 fabric 的主题,它也没有侧边栏。

而且我还发现只修改 _config.yml 是行不通的。

但我在经典主题中找到了这个source/_layouts/post

 {% unless page.sidebar == false %}
 <aside class="sidebar">
   {% if site.post_asides.size %}
 {% include_array post_asides %}
   {% else %}
     {% include_array default_asides %}
   {% endif %}
 </aside>

所以很明显,如果你想要一个侧边栏,你还需要将类似的代码添加到你的新主题中。

希望这可以给你一些见解。^_^

于 2013-10-15T14:47:48.683 回答