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]
|
case @item[:extension]
|
||||||
when "mkd" # normal pages
|
when "mkd" # normal pages
|
||||||
filter :erb
|
filter :erb
|
||||||
filter :kramdown
|
filter :kramdown, :toc_levels => [1,2]
|
||||||
filter :colorize_syntax, :default_colorizer => :pygmentize
|
filter :colorize_syntax, :default_colorizer => :pygmentize
|
||||||
when "org" # org-mode pages
|
when "org" # org-mode pages
|
||||||
filter :org
|
filter :org
|
||||||
|
|
|
@ -25,6 +25,10 @@ def route_unchanged
|
||||||
item.identifier.chop + '.' + item[:extension]
|
item.identifier.chop + '.' + item[:extension]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def toc
|
||||||
|
"- ToC\n{:toc}"
|
||||||
|
end
|
||||||
|
|
||||||
class Nanoc3::Site
|
class Nanoc3::Site
|
||||||
# only articles that actually get printed
|
# only articles that actually get printed
|
||||||
attr_reader :printed_items
|
attr_reader :printed_items
|
||||||
|
|
Loading…
Reference in a new issue