Octopressに「続きを読む」のプラグイン導入
「続きを読む」ように、記事を折りたたむプラグインを導入。
Octopressなら、/plaginsディレクトリに 以下のpostmore.rbを設定する。
module PostMore
def postmorefilter(input, url, text)
if input.include? "
"
input.split("
").first + "<p class='more'><a href='#{url}'>#{text}</a></p>"
else
input
end
end
end
Liquid::Template.register_filter(PostMore)