tomcritchlow
tomcritchlow

Reputation: 785

Trouble getting collections working with github pages

there.

Here's my 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:          [email protected]


collections:
  - poetry:
    output: true

And here's my folder structure:

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

Yet on my archive page when I do this:

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

Nothing happens... I'm also struggling to render anything in my poetry collection.

You can see the github repo here:

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

What am I doing wrong? How do you get collections working on Github pages? I'm totally new to github. Thanks.

Upvotes: 1

Views: 399

Answers (2)

David Jacquel
David Jacquel

Reputation: 52809

Looking at you github repository gave me some ideas about your problems.

First, answering to your question, your config.yaml file MUST be named _config.yml if you want Jekyll to take it into account.

But, there is a lot of other issues all over you site (empty _layouts/default.html, no _layouts/page.html, _layouts/blog.html as no front matter, baseurl/ set to / instead of "",...).

I really think it's better to work on an new clean version and copy you content to it.

  • gem update
  • make a new working folder eg: mkdir newjekyll
  • go to it
  • jekyll new .
  • copy your content to your new jekyll including your collection
  • jekyll serve
  • all will be ok on 127.0.0.1:4000/

Upvotes: 0

ThomasReggi
ThomasReggi

Reputation: 59365

You had config.yaml instead of _config.yaml

Upvotes: 1

Related Questions