summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2022-07-27 21:55:43 +0200
committerVolpeon <git@volpeon.ink>2022-07-27 21:55:43 +0200
commita7a1cbb8302897ba72bd4d6b308dbeaa3f029dc5 (patch)
tree65081fbae39d272b23b165606f63edf4bc15da6f /scripts
parentBetter handling of drafts (diff)
downloadvolpeon.ink-a7a1cbb8302897ba72bd4d6b308dbeaa3f029dc5.tar.gz
volpeon.ink-a7a1cbb8302897ba72bd4d6b308dbeaa3f029dc5.tar.bz2
volpeon.ink-a7a1cbb8302897ba72bd4d6b308dbeaa3f029dc5.zip
Update
Diffstat (limited to 'scripts')
-rw-r--r--scripts/metadata.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/metadata.lua b/scripts/metadata.lua
index 9cb9970..a32ee29 100644
--- a/scripts/metadata.lua
+++ b/scripts/metadata.lua
@@ -44,7 +44,7 @@ function page_sort(order)
44 return function(p1, p2) 44 return function(p1, p2)
45 if p1.position then 45 if p1.position then
46 if p2.position then 46 if p2.position then
47 return tonumber(p1.position) < tonumber(p2.position) 47 return p1.position < p2.position
48 else 48 else
49 return true 49 return true
50 end 50 end
@@ -170,7 +170,7 @@ function find_depth(pages)
170 170
171 for i = 1, #pages.all do 171 for i = 1, #pages.all do
172 local p = pages.all[i] 172 local p = pages.all[i]
173 local d = tonumber(p.depth) + 1 173 local d = p.depth + 1
174 if d > depth then depth = d end 174 if d > depth then depth = d end
175 end 175 end
176 176
@@ -289,7 +289,7 @@ function process(global, meta)
289 if meta.list_order then meta.list_order = pandoc.utils.stringify(meta.list_order) end 289 if meta.list_order then meta.list_order = pandoc.utils.stringify(meta.list_order) end
290 meta.list_layout = meta.list_layout and prep_layout(meta.list_layout) 290 meta.list_layout = meta.list_layout and prep_layout(meta.list_layout)
291 if meta.list_limit then meta.list_limit = tonumber(pandoc.utils.stringify(meta.list_limit)) end 291 if meta.list_limit then meta.list_limit = tonumber(pandoc.utils.stringify(meta.list_limit)) end
292 if meta.position then meta.position = pandoc.utils.stringify(meta.position) end 292 if meta.position then meta.position = tonumber(pandoc.utils.stringify(meta.position)) end
293 293
294 if meta.feed then 294 if meta.feed then
295 if meta.file_out:match(".html$") then 295 if meta.file_out:match(".html$") then