georgi-shinmun 0.3.8 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,9 +12,9 @@
12
12
 
13
13
  <div style="margin:1em 0em 1em 0em; color:#666">
14
14
  <% if @post.category %>
15
- Posted in category <%= link_to @post.category, "/categories/#{urlify @post.category}.html" %> by <%= @blog.author %>.
15
+ Posted in category <%= link_to @post.category, "/categories/#{urlify @post.category}" %> by <%= @blog.author %>.
16
16
  <% end %>
17
- Tagged with <%= @post.tags %>.
17
+ Tagged with <%= @post.tag_list.map {|tag| link_to tag, "/tags/#{urlify tag}" }.join(', ') %>.
18
18
  </div>
19
19
 
20
20
  <h6>Similar Posts</h6>
@@ -8,6 +8,10 @@ Shinmun::Blog.map do
8
8
  render 'category.rhtml', find_category(category)
9
9
  end
10
10
 
11
+ get '/tags/(.*)' do |tag|
12
+ render 'category.rhtml', :name => "Tag: #{tag}", :posts => posts.select { |p| p.tag_list.include?(tag) }
13
+ end
14
+
11
15
  get '/(\d+)/(\d+)/(.*)' do |year, month, name|
12
16
  post = find_post(year.to_i, month.to_i, name)
13
17
  render 'post.rhtml', :post => post, :comments => comments_for(post.path)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: georgi-shinmun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthias Georgi