mirror of
https://github.com/fmap/muflax65ngodyewp.onion
synced 2024-06-29 10:36:48 +02:00
basic toc support
This commit is contained in:
parent
12a0665fb1
commit
1b80d01f5f
2
Rules
2
Rules
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue