Question

What I'm trying to do is setup my website so that it has blog posts, a blog, and then a homepage.

From what I've read at https://github.com/mojombo/jekyll/wiki/Usage , I should be able place an html file in my root directory (the directory that contains index.htm, _site, _posts, etc) and as long as it has YML front matter, Jekyll should add it to my _site directory when the command is run.

I currently have a file called 2011-03-140-blog.html that looks like this:

---
permalink: /blog
---

<div id="posts">

        {% for post in site.posts offset: 0 limit: 10 %}
          <h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
          {{ post.date | date_to_string }}
           {{ post.content }}

        {% endfor %}

    </div>

and when I run jekyll --server I get the following:

 Configuration from /Users/noahclark/Sites/noahc/_config.yml
Building site: /Users/noahclark/Sites/noahc -> /Users/noahclark/Sites/noahc/_site
/Library/Ruby/Gems/1.8/gems/jekyll-0.10.0/bin/../lib/jekyll/page.rb:115:in `initialize': Is a directory - /Users/noahclark/Sites/noahc/_site/blog (Errno::EISDIR)
    from /Library/Ruby/Gems/1.8/gems/jekyll-0.10.0/bin/../lib/jekyll/page.rb:115:in `open'
    from /Library/Ruby/Gems/1.8/gems/jekyll-0.10.0/bin/../lib/jekyll/page.rb:115:in `write'
    from /Library/Ruby/Gems/1.8/gems/jekyll-0.10.0/bin/../lib/jekyll/site.rb:194:in `write'
    from /Library/Ruby/Gems/1.8/gems/jekyll-0.10.0/bin/../lib/jekyll/site.rb:193:in `each'
    from /Library/Ruby/Gems/1.8/gems/jekyll-0.10.0/bin/../lib/jekyll/site.rb:193:in `write'
    from /Library/Ruby/Gems/1.8/gems/jekyll-0.10.0/bin/../lib/jekyll/site.rb:83:in `process'
    from /Library/Ruby/Gems/1.8/gems/jekyll-0.10.0/bin/jekyll:164
    from /usr/bin/jekyll:19:in `load'
    from /usr/bin/jekyll:19

Any ideas one what I'm doing wrong?

Was it helpful?

Solution

Changing permalink: /blog to permalink: /blog.html should fix that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top