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

Can dates be included in collection permalinks? #3942

Closed
bdesham opened this issue Aug 28, 2015 · 3 comments
Closed

Can dates be included in collection permalinks? #3942

bdesham opened this issue Aug 28, 2015 · 3 comments

Comments

@bdesham
Copy link
Contributor

bdesham commented Aug 28, 2015

I’m using Jekyll 3.0.0.pre.beta8. My site has three kinds of pages: the usual pages and posts and also link posts, which are essentially the same as “normal” posts except that they use a different layout and have different permalinks.

I would like to implement link posts as a collection but it seems that I can’t use dates in collection permalinks: with the configuration below, the links are all written to paths like

/links/:year/:month/2015-08-28-whatever.html

while I was expecting paths like

/links/2015/08/whatever.html

Is there something wrong with my configuration or are these parameters not (yet?) supported for collection permalinks?

The relevant parts of my configuration are as follows:

permalink: :year/:month/:title.html
collections:
    links:
        output: true
        permalink: links/:year/:month/:title.html
defaults:
    - scope:
        path: ""
        type: pages
      values:
        layout: new

    - scope:
        path: ""
        type: posts
      values:
        layout: article

    - scope:
        path: links
        type: links
      values:
        layout: link

The input files have paths like

_links/2015-08-28-whatever.md
@pathawks
Copy link
Member

I have also had this problem.

@envygeeks
Copy link
Contributor

I honestly don't think we dig that deep into the YAML for collections. @parkr would know more, maybe @willnorris I think he worked on it a bit yeah?

@parkr
Copy link
Member

parkr commented Aug 28, 2015

I honestly don't think we dig that deep into the YAML for collections.

Troof. Part of my work in #3690 is to make this accessible to the _posts collection but it's not available yet. Let's fold this into that PR.

@parkr parkr closed this as completed Aug 28, 2015
@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
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

5 participants