about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/blogs_controller.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/blogs_controller.rb b/app/controllers/blogs_controller.rb index 033d6bb..4f6d9ce 100644 --- a/app/controllers/blogs_controller.rb +++ b/app/controllers/blogs_controller.rb
@@ -1,5 +1,11 @@
1require 'redcarpet/render_strip' 1require 'redcarpet/render_strip'
2 2
3class StrippedSummary < Redcarpet::Render::StripDown
4 def block_html(raw_html)
5 nil
6 end
7end
8
3class BlogsController < ApplicationController 9class BlogsController < ApplicationController
4 10
5 def summary 11 def summary
@@ -27,7 +33,7 @@ class BlogsController < ApplicationController
27 @prev = @blog.prev 33 @prev = @blog.prev
28 @next = @blog.next 34 @next = @blog.next
29 35
30 body = Redcarpet::Markdown.new(Redcarpet::Render::StripDown).render(@blog.body) 36 body = Redcarpet::Markdown.new(StrippedSummary).render(@blog.body)
31 37
32 set_meta_tags(og: { 38 set_meta_tags(og: {
33 title: @blog.title, 39 title: @blog.title,