无法使用github页面处理集合

时间:2014-12-03 21:50:05

标签: collections jekyll github-pages

那里。

这是我的config.yaml:

# Permalinks
permalink:        pretty
relative_permalinks: true

# Setup
title:            Tom Critchlow Title
tagline:          My Github Site
url:              http://tomcritchlow.com
paginate:         1
baseurl:          /
author:
  name:           Tom Critchlow
  url:            https://twitter.com/tomcritchlow
  email:          tjcritchlow@gmail.com


collections:
  - poetry:
    output: true

这是我的文件夹结构:

-config.yaml
-index.html
-archive.md
_layouts
_poetry
_posts

当我这样做时,在我的存档页面上:

{% for poem in site.poetry %}
  hello world
{% endfor %}

没有任何事情发生......我也在努力在我的诗集中渲染任何东西。

你可以在这里看到github repo:

https://github.com/tomcritchlow/tomcritchlow.github.io

我做错了什么?你如何在Github页面上获得收藏?我对github完全不熟悉。感谢。

2 个答案:

答案 0 :(得分:1)

您有config.yaml而不是_config.yaml

答案 1 :(得分:0)

看着你github存储库给了我一些关于你的问题的想法 s

首先,如果您希望Jekyll将其考虑在内,请回答您的问题,将config.yaml文件必须命名为_config.yml

但是,您的网站上存在很多其他问题(空_layouts/default.html,没有_layouts/page.html_layouts/blog.html,因为没有前面的问题,{{ 1}}设置为baseurl/而不是/,...)。

我认为最好使用新的干净版本并将内容复制到其中。

  • ""
  • 制作一个新的工作文件夹,例如:gem update
  • 转到它
  • mkdir newjekyll
  • 将您的内容复制到新的jekyll,包括您的收藏
  • jekyll new .
  • 所有在127.0.0.1:4000 /
  • 上都可以
相关问题