9

I'm using Jekyll to create a blog/website. I have it setup so that it displays the URLs like this:

http://example.com/blog/title-of-post

I want to modify it to change the the "blog" part of the URL. For example:

http://example.com/writing/title-of-post

How can I do this?

Alan W. Smith
  • 24,647
  • 4
  • 70
  • 96
user1371254
  • 91
  • 1
  • 3
  • I'm confused as to what exactly you want. – Venge May 14 '12 at 02:05
  • 1
    @Patrick All my URLs contain "blog" between my domain and the title of the blog post. I want to change that to be something else (so my writings aren't stored in a folder named blog, but rather in a folder with a different name - such as "writing"). How would I do that? – user1371254 May 14 '12 at 07:23

1 Answers1

13

You can do this by setting the permalink in your _config.yml file. For example:

permalink: /writing/:title

Note that this assumes that jekyll is building your entire site and isn't just powering the "blog" directory. If jekyll is only writing to your "blog" directory, then all you would need to do is rename that to "writing".

vvvvv
  • 25,404
  • 19
  • 49
  • 81
Alan W. Smith
  • 24,647
  • 4
  • 70
  • 96
  • 1
    I additionally needed to stop my server and rebuild after changing `_config.yml`: https://stackoverflow.com/questions/14325445/auto-regeneration-is-not-working-with-config-yml – pkamb Apr 08 '20 at 08:12