سؤال

I've been using Jekyll 2.0 directly from the command line for the last few days. I've put all my page files into a '/pages' folder so it looks like this:

/pages
  - index.html
  - about.html
  - contact.html

In the front matter of each page I set the permalink like this:

permalink: /about/

So when Jekyll compiles the site, I'm able to navigate successfully to localhost:8888/about/ it's been working really well.

The Grunt/Yeoman problem:

I've picked up the generator-jekyllrb for Yeoman today because I want Grunt to manage everything (live reloading etc). I set it up, everything is working fine... but Jekyll is no longer generating the folders according to the permalink.

For example, my "about.html" page inside /pages, is not having an "/about" folder generated in the root like it did when using Jekyll directly. So I can only access the page through: localhost:8888/pages/about/. Which is strange.

Here's my Gruntfile.js generated from Yeoman

I don't know a whole great deal about this stuff. I'm very new to Grunt and the CL, but this has really stumped me. If anyone could offer any advice or point me in the right direction I'd really appreciate it.

هل كانت مفيدة؟

المحلول

I ended up adding the following to my _config.yml:

relative_permalinks: false

which fixed the problem. I think grunt-jekyllrb must be a version behind or something, because absolute permalinks are defaults now in the latest Jekyll.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top