From 386ea77e28ac567cbaa69274090bd8c3bd82d86d Mon Sep 17 00:00:00 2001 From: thomasdao Date: Tue, 12 Nov 2013 13:29:38 +0800 Subject: [PATCH] For issue #1714: Add documentation for post_url when posts are in subdirectory --- site/docs/templates.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/site/docs/templates.md b/site/docs/templates.md index c84eb827..7cf2a865 100644 --- a/site/docs/templates.md +++ b/site/docs/templates.md @@ -290,6 +290,15 @@ will generate the correct permalink URL for the post you specify. {% endraw %} {% endhighlight %} +If you organize your posts in subdirectories, you need to include subdirectory +path to the post: + +{% highlight text %} +{% raw %} +{% post_url /subdir/2010-07-21-name-of-post %} +{% endraw %} +{% endhighlight %} + There is no need to include the file extension when using the `post_url` tag. You can also use this tag to create a link to a post in Markdown as follows: