From 7f2deacd64ee2e4cb5d4850a99ff298c0353017d Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 12 Jun 2022 12:07:29 +0200 Subject: Fixed list, updated fonts, fixed source wrapping --- scripts/metadata_filter.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua index 314f2b0..cb060fa 100644 --- a/scripts/metadata_filter.lua +++ b/scripts/metadata_filter.lua @@ -185,10 +185,11 @@ function d1_page_to_list_item(meta, p) } end -function d2_page_to_list_item(meta, cat, p) +function d2_page_to_list_item(meta, cat, p, set_cat_title) return { title = p.title, subtitle = p.subtitle, + category = set_cat_title and cat.title, date = p.date, position = p.position, url = p.url, @@ -229,7 +230,7 @@ function generate_list(meta) return meta.pages.all :map(function(cat) local allItems = ((cat.pages and cat.pages.all) or pandoc.List()) - :map(function(p) return d2_page_to_list_item(meta, cat, p) end) + :map(function(p) return d2_page_to_list_item(meta, cat, p, false) end) return cat_to_list_cat(cat, allItems) end) @@ -241,7 +242,7 @@ function generate_list(meta) :map(function(cat) local allItems = (cat.pages and cat.pages.all or pandoc.List()):flatMap(function(c) if c.pages then - return c.pages.all:map(function(p) return d2_page_to_list_item(cat, c, p) end) + return c.pages.all:map(function(p) return d2_page_to_list_item(cat, c, p, true) end) else return pandoc.List({ d1_page_to_list_item(cat, c) }) end -- cgit v1.2.3-70-g09d2