Files
jekyll/site/_posts/2012-07-01-permalinks.md
Tom Preston-Werner cc73f04eb7 Update site dir with contents of #583 at rev cb19367.
This is the big site redesign by @cobyism. To work with the new
site deployment mechanism, it is being copied from the gh-pages
branch of that PR into the existing site dir. Before we finally
deploy the new site, we should remember to merge #583 so that we
keep all the history from that PR.
2012-12-31 12:48:04 -08:00

3.3 KiB
Raw Blame History

layout, title, prev_section, next_section
layout title prev_section next_section
docs Permalinks templates pagination

Jekyll supports a flexible way to build your sites URLs. You can specify the permalinks for your site through the Configuration or on the YAML Front Matter for each post. Youre free to choose one of the built-in styles to create your links or craft your own. The default style is always date.

Template variables

Variable Description

year

Year from the posts filename

month

Month from the posts filename

day

Day from the posts filename

title

Title from the posts filename

categories

The specified categories for this post. Jekyll automatically parses out double slashes in the URLs, so if no categories are present, it basically ignores this.

i_month

 Month from the posts filename without leading zeros.

i_day

Day from the posts filename without leading zeros.

Permalink Style URL Template

date

/:categories/:year/:month/:day/:title.html

pretty

/:categories/:year/:month/:day/:title/

none

/:categories/:title.html

Given a post named: /2009-04-29-slap-chop.textile

Permalink Setting Resulting Permalink URL

None specified, or permalink: date

/2009/04/29/slap-chop.html

permalink: pretty

/2009/04/29/slap-chop/index.html

permalink: /:month-:day-:year/:title.html

/04-29-2009/slap-chop.html

permalink: /blog/:year/:month/:day/:title

/blog/2009/04/29/slap-chop/index.html