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)参考
Related contents
TECH
2013.11.24
TECH
2013.05.23
TECH
2013.05.20
TECH
2013.02.03
TECH
2017.01.08
TECH
2015.08.30
TECH
2014.12.13
TECH
2014.12.02