summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2021-11-14 10:28:18 +0100
committerVolpeon <git@volpeon.ink>2021-11-14 10:28:18 +0100
commitf9a74f5ca7c1e919bba46d99d65a7b3a893a7bd7 (patch)
tree14853441ca7cd8f7e283c93e871d801cd43db10a /scripts
parentGenerate special list metadata (diff)
downloadvolpeon.ink-f9a74f5ca7c1e919bba46d99d65a7b3a893a7bd7.tar.gz
volpeon.ink-f9a74f5ca7c1e919bba46d99d65a7b3a893a7bd7.tar.bz2
volpeon.ink-f9a74f5ca7c1e919bba46d99d65a7b3a893a7bd7.zip
List improvements
Diffstat (limited to 'scripts')
-rw-r--r--scripts/metadata_filter.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua
index b16d472..b6df703 100644
--- a/scripts/metadata_filter.lua
+++ b/scripts/metadata_filter.lua
@@ -200,7 +200,7 @@ function generate_list(meta)
200 return meta.pages.all:map(function(cat) 200 return meta.pages.all:map(function(cat)
201 return { 201 return {
202 title = cat.title, 202 title = cat.title,
203 content = pandoc.utils.stringify(cat.content), 203 content = cat.content,
204 url = cat.url, 204 url = cat.url,
205 grid = cat.list_grid, 205 grid = cat.list_grid,
206 items = cat.pages.all:map(function(p) 206 items = cat.pages.all:map(function(p)
@@ -220,7 +220,7 @@ function generate_list(meta)
220 return meta.pages.all:map(function(cat) 220 return meta.pages.all:map(function(cat)
221 return { 221 return {
222 title = cat.title, 222 title = cat.title,
223 content = pandoc.utils.stringify(cat.content), 223 content = cat.content,
224 url = cat.url, 224 url = cat.url,
225 grid = cat.list_grid, 225 grid = cat.list_grid,
226 items = cat.pages.all:flatMap(function(c) 226 items = cat.pages.all:flatMap(function(c)
@@ -228,7 +228,8 @@ function generate_list(meta)
228 return c.pages.all:map(function(p) 228 return c.pages.all:map(function(p)
229 return { 229 return {
230 title = p.title, 230 title = p.title,
231 subtitle = p.subtitle or c.title, 231 subtitle = p.subtitle,
232 category = c.title,
232 url = p.url, 233 url = p.url,
233 icon = p.icon or c.icon, 234 icon = p.icon or c.icon,
234 post_icon = c.list_post_icon or cat.list_post_icon, 235 post_icon = c.list_post_icon or cat.list_post_icon,
@@ -241,9 +242,9 @@ function generate_list(meta)
241 title = c.title, 242 title = c.title,
242 subtitle = c.subtitle, 243 subtitle = c.subtitle,
243 url = c.url, 244 url = c.url,
244 icon = c.icon or meta.icon, 245 icon = c.icon or cat.icon,
245 post_icon = meta.list_post_icon, 246 post_icon = cat.list_post_icon,
246 indicator = meta.list_read_indicators, 247 indicator = cat.list_read_indicators,
247 }) 248 })
248 return l 249 return l
249 end 250 end