diff options
author | Lars Henrik Mai <lars.mai@kontinui.de> | 2014-04-09 17:41:17 +0200 |
---|---|---|
committer | Lars Henrik Mai <lars.mai@kontinui.de> | 2014-04-09 17:41:17 +0200 |
commit | a3995bf898c38ed755a3e1bd60b3b4aaf27670ec (patch) | |
tree | 75882cb224243a2e8856371245c698f382a922fb /config.rb | |
parent | 4299ee398c19076ab27451b669d7f726d6e6a45d (diff) |
add custom blog article summary generator that truncates to first pararaph
Diffstat (limited to 'config.rb')
-rw-r--r-- | config.rb | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -15,6 +15,9 @@ activate :blog do |blog| # blog.layout = "layout" # blog.summary_separator = /(READMORE)/ # blog.summary_length = 250 + + blog.summary_generator = Proc.new {|article, rendered, length, ellipsis| Nokogiri::HTML(rendered).at_xpath("//p[1]").to_s + link_to(ellipsis, article) } + # blog.year_link = "{year}.html" # blog.month_link = "{year}/{month}.html" # blog.day_link = "{year}/{month}/{day}.html" |