Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the blog post URL of a Jekyll website?

Tags:

jekyll

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?

like image 489
user1371254 Avatar asked May 14 '12 01:05

user1371254


People also ask

What is the URL of Jekyll?

When you run jekyll serve , Jekyll will build your site with the value of the host , port , and SSL-related options. This defaults to url: http://localhost:4000 .


1 Answers

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".

like image 103
Alan W. Smith Avatar answered Oct 10 '22 02:10

Alan W. Smith