Browse code

Fix extra subdirectories appearing in category links and atom.xml link.

Brigham Brown authored on 12/08/2011 at 04:30:45
Showing 2 changed files
... ...
@@ -25,8 +25,7 @@
25 25
   <script src="{{ root_url }}/javascripts/modernizr-2.0.js"></script>
26 26
   <script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
27 27
   <script src="{{ root_url }}/javascripts/octopress.js" type="text/javascript"></script>
28
-  {% capture rss_url %}{% if site.subscribe_rss contains ':' %}{{ site.subscribe_rss }}{% else %}{{ root_url }}{{ site.subscribe_rss }}{% endif %}{% endcapture %}
29
-  <link href="{{ rss_url }}" rel="alternate" title="{{site.title}}" type="application/atom+xml"/>
28
+  <link href="{{ site.subscribe_rss }}" rel="alternate" title="{{site.title}}" type="application/atom+xml"/>
30 29
   {% include google_analytics.html %}
31 30
   {% include google_plus_one.html %}
32 31
   {% include twitter_sharing.html %}
... ...
@@ -104,9 +104,8 @@ module Jekyll
104 104
     #
105 105
     def category_links(categories)
106 106
       dir = @context.registers[:site].config['category_dir']
107
-      root_url = @context.registers[:site].config['root'].sub(/\/$/, '')
108 107
       categories = categories.sort!.map do |item|
109
-        "<a class='category' href='#{root_url}/#{dir}/#{item.gsub(/_|\W/, '-')}/'>#{item}</a>"
108
+        "<a class='category' href='/#{dir}/#{item.gsub(/_|\W/, '-')}/'>#{item}</a>"
110 109
       end
111 110
 
112 111
       case categories.length