20

What I'm trying to do is get all my posts to have the following format: domain.com/blog/title.

However, in my _posts folder I have a file named 2010-07-11-hello.markdown and it contains the following:

---
title: Hello
permalink: /blog/:title/ 
---
Hello World!

What am I doing wrong? The permalinks aren't being converted. For example, the URL looks like this: http://localhost:4000/blog/:title/ and I want the actual title to show up there.

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
Noah Clark
  • 8,101
  • 14
  • 74
  • 116

1 Answers1

27

You should move the permalink setting into the _config.yml file as described at http://jekyllrb.com/docs/configuration/

Paul Verest
  • 60,022
  • 51
  • 208
  • 332
Marcin Białoń
  • 590
  • 4
  • 10
  • 11
    +1 IIRC the `permalink` setting from the YAML Front Matter isn't interpolated; it's used exactly as typed. Only the `_config.yml` setting is interpolated. – Michelle Tilley Mar 13 '11 at 08:25
  • @brandon this is the piece I was missing, and thanks for adding it. I don't know if I would have understand why, or how to make it work without this helpful comment. – Noah Clark Mar 14 '11 at 16:13
  • @MichelleTilley this behavior has now changed, and `permalink` in YAML FrontMatter is interpolated as well (tested in `3.0.2`) – FloatingRock Jan 25 '16 at 07:32