summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2021-11-14 10:40:04 +0100
committerVolpeon <git@volpeon.ink>2021-11-14 10:40:04 +0100
commitedf3d329c6757cfe62dc55bb31605094ae28bf8b (patch)
tree5863230b0d8aff4f3cc1cc16d3a7b2ab0de607af /scripts
parentList improvements (diff)
downloadvolpeon.ink-edf3d329c6757cfe62dc55bb31605094ae28bf8b.tar.gz
volpeon.ink-edf3d329c6757cfe62dc55bb31605094ae28bf8b.tar.bz2
volpeon.ink-edf3d329c6757cfe62dc55bb31605094ae28bf8b.zip
Fix list generation
Diffstat (limited to 'scripts')
-rw-r--r--scripts/metadata_filter.lua18
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua
index b6df703..4014db4 100644
--- a/scripts/metadata_filter.lua
+++ b/scripts/metadata_filter.lua
@@ -218,11 +218,9 @@ function generate_list(meta)
218 end) 218 end)
219 elseif meta.depth == "3" then 219 elseif meta.depth == "3" then
220 return meta.pages.all:map(function(cat) 220 return meta.pages.all:map(function(cat)
221 return { 221 local items = pandoc.List()
222 title = cat.title, 222
223 content = cat.content, 223 if cat.pages then
224 url = cat.url,
225 grid = cat.list_grid,
226 items = cat.pages.all:flatMap(function(c) 224 items = cat.pages.all:flatMap(function(c)
227 if c.pages then 225 if c.pages then
228 return c.pages.all:map(function(p) 226 return c.pages.all:map(function(p)
@@ -248,7 +246,15 @@ function generate_list(meta)
248 }) 246 })
249 return l 247 return l
250 end 248 end
251 end), 249 end)
250 end
251
252 return {
253 title = cat.title,
254 content = cat.content,
255 url = cat.url,
256 grid = cat.list_grid,
257 items = items,
252 } 258 }
253 end) 259 end)
254 end 260 end