Search code examples
jekyllpermalinks

Can I set the permalink to the folder name in the Jekyll config file?


I know that variables are not allowed in the _config.yml file, but I want the functionality that

scope:
  path: "_pages"
values:
  layout: "interior"
  permalink: {{ page.url }}

would produce.

All of my pages are in their own folder so I don't want to have to repeat permalink: {{ page.url }} in the Front Matter of each page.

Is there a solution?


Solution

  • I have a separate folder for (non-blog post) pages and that's what I was trying to set up the permalinks for. Turns out what I wanted was...

    permalink: /pagename/

    in my front matter.