Nathan H
Nathan H

Reputation: 49371

Jekyll different permalinks for posts than other pages

I am using permalink: pretty for all of my site (static pages).

However for blog posts, I would like to use permalink: /blog/:year/:month/:day/:title/.

How do I set two different permalink styles?

Upvotes: 1

Views: 360

Answers (1)

Nathan H
Nathan H

Reputation: 49371

My working solution, in _config.yml:

permalink: pretty
defaults:
  -
    scope:
      path: ""
      type: "posts"
    values:
      category: blog

Since the pretty settings prepends the category to the path, I set that all posts should have a category of blog.

Upvotes: 1

Related Questions