summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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