16

Does Jekyll support setting multiple permalinks?

For example, I currently have the following in my _config.yml:

permalink: /:categories/:title/

What I would like to have, is the following:

permalink: - /:categories/:title/ - /:year/:month/:day/:title/

What I'm trying to achieve it that a single post will have multiple URLs. I'm well aware that I can use the "redirect_from" plugin (I'm hosting in GitHub Pages), but that would require me to manually update all my posts to include the redirect_from in the YAML

SaguiItay
  • 2,145
  • 1
  • 18
  • 40
  • 2
    The developers want to have a 1:1 relationship as you can see here: https://github.com/jekyll/jekyll/issues/3368 Maybe that will change, if many people vote for the ticket. – Edward Dec 22 '16 at 14:13

1 Answers1

2

have you checked out jekyll-archives? https://github.com/jekyll/jekyll-archives

you can create other permalinks like

permalinks:
  year: '/:year/'
  month: '/:year/:month/'
  day: '/:year/:month/:day/'
  tag: '/tag/:name/'
  category: '/category/:name/'

i don't think you can use :title though. it's an index page that lists posts.

w1n78
  • 789
  • 1
  • 7
  • 19