1
0
Fork 0
mirror of https://github.com/fmap/muflax65ngodyewp.onion synced 2024-06-26 10:26:48 +02:00

basic toc support

This commit is contained in:
muflax 2011-12-16 04:58:41 +01:00
parent 12a0665fb1
commit 1b80d01f5f
2 changed files with 5 additions and 1 deletions

2
Rules
View file

@ -89,7 +89,7 @@ compile '*' do
case @item[:extension]
when "mkd" # normal pages
filter :erb
filter :kramdown
filter :kramdown, :toc_levels => [1,2]
filter :colorize_syntax, :default_colorizer => :pygmentize
when "org" # org-mode pages
filter :org

View file

@ -25,6 +25,10 @@ def route_unchanged
item.identifier.chop + '.' + item[:extension]
end
def toc
"- ToC\n{:toc}"
end
class Nanoc3::Site
# only articles that actually get printed
attr_reader :printed_items