Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_config.yml 'defaults:' doesn't work for permalink #2280

Closed
edj-boston opened this issue Apr 30, 2014 · 6 comments
Closed

_config.yml 'defaults:' doesn't work for permalink #2280

edj-boston opened this issue Apr 30, 2014 · 6 comments

Comments

@edj-boston
Copy link

I've tried this on Jekyll 1.4.3 and 1.5.1. I have Ruby version ruby 2.0.0p247 (2013-06-27 revision 41674) installed. I'm on a mac using this command to preview my site:

jekyll serve --watch

I want my permalink setting to be "post"-specific. but it doesn't work

Doesn't work:

markdown: redcarpet
defaults:
  -
    scope:
      type: "post"
    values:
      permalink: /:categories/:title

Works (but is too general):

markdown: redcarpet
permalink: /:categories/:title
@parkr
Copy link
Member

parkr commented Apr 30, 2014

You need to install the RC in order to use this: gem install jekyll --pre. It's not available yet in a full release.

@parkr parkr closed this as completed Apr 30, 2014
@edj-boston
Copy link
Author

Thanks!

This wasn't clear on the docs. Maybe this section could get the yellow 'unreleased' banner on it in the meantime?

@parkr
Copy link
Member

parkr commented Apr 30, 2014

Yes! I will add that now. Thanks!

@ibc
Copy link

ibc commented Apr 19, 2016

jekyll 3.1.2

This produces the expected result:

permalink: pretty

defaults:
  -
    scope:
      path: ''
    values:
      layout: layout

However this:

defaults:
  -
    scope:
      path: ''
    values:
      layout: layout
      permalink: pretty

generates a ugly _site/pretty.html file...

@parkr
Copy link
Member

parkr commented Apr 20, 2016

@ibc pretty only works in permalink in the _config.yml file, what you did there is the equivalent of writing permalink: pretty at the top of your file which is not a possibility.

@ibc
Copy link

ibc commented Apr 21, 2016

Clear.

@jekyll jekyll locked and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants