2
votes

In my config file for Jekyll, I have the permalink set to permalink: /:year/:month/:day/:title/ so that the HTML extension is removed from the post, but this only works for markdown posts, not pages as well.

If I want all my pages to have the .html removed, such as my about.html page change to just /about, do I have to create the folder then have the index.html, or is there a way Jekyll can do that for me?

2

2 Answers

1
votes

This setting in _config.yml will work :

# applies pretty for all
permalink: pretty

# overrides permalink for posts
defaults:
  -
    scope:
      path: ""
      type: "posts"
    values:
      permalink: /:year/:month/:day/:title/

Note that a permalink in a page front matter will override the one in config.

0
votes

Check this setting for YAML config file:

#for all pages
permalink: pretty

#for posts
defaults:
  - scope:
     path: ""
     type: "posts"
    values:
     permalink: /blog/:title