aboutsummaryrefslogtreecommitdiff
path: root/.themes/classic/plugins
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-07-16 09:29:09 -0400
committerBrandon Mathis <brandon@imathis.com>2011-07-16 09:29:09 -0400
commitf81bdbc1a8e341d9d3fe1eba3b77beadfe59b3d6 (patch)
tree31458d76b97e7e6af151be3bbf666bd58d7f9739 /.themes/classic/plugins
parent4855ef5d2f976b07d624dddb85b46075009d5a6d (diff)
downloadmy_new_personal_website-f81bdbc1a8e341d9d3fe1eba3b77beadfe59b3d6.tar.xz
my_new_personal_website-f81bdbc1a8e341d9d3fe1eba3b77beadfe59b3d6.zip
Added support and documentation for deploying to subdirectories (like
with gh-pages)
Diffstat (limited to '.themes/classic/plugins')
-rw-r--r--.themes/classic/plugins/category_generator.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/.themes/classic/plugins/category_generator.rb b/.themes/classic/plugins/category_generator.rb
index 8fd26682..c2e9a46e 100644
--- a/.themes/classic/plugins/category_generator.rb
+++ b/.themes/classic/plugins/category_generator.rb
@@ -129,8 +129,10 @@ module Jekyll
# Returns string
#
def category_links(categories)
+ dir = @context.registers[:site].config['category_dir']
+ root_url = @context.registers[:site].config['root']
categories = categories.sort!.map do |item|
- "<a class='category' href='/#{@context.registers[:site].config['category_dir']}/#{item.gsub(/_|\W/, '-')}/'>#{item}</a>"
+ "<a class='category' href='#{root_url}/#{dir}/#{item.gsub(/_|\W/, '-')}/'>#{item}</a>"
end
case categories.length