From aa4c54317b51dc14ba65d2e091b701ae6640ee80 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 16 Jun 2022 13:42:26 +0200 Subject: WIP: Adding metadata --- scripts/metadata_filter.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts') diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua index b78c480..3fc6c66 100644 --- a/scripts/metadata_filter.lua +++ b/scripts/metadata_filter.lua @@ -189,6 +189,7 @@ function d1_page_to_list_item(meta, p) subtitle = p.subtitle, date = p.date, last_update = p.last_update, + schema_type = p.schema_type, position = p.position, url = p.url, slug = p.slug, @@ -206,6 +207,7 @@ function d2_page_to_list_item(meta, cat, p, set_cat_title) category = set_cat_title and cat.title, date = p.date, last_update = p.last_update, + schema_type = p.schema_type, position = p.position, url = p.url, slug = p.slug, @@ -226,6 +228,7 @@ function cat_to_list_cat(cat, allItems) description = (cat.description and pandoc.MetaBlocks(pandoc.Para(cat.description))) or (not cat.no_description and cat.content), last_update = cat.last_update, + schema_type = cat.schema_type, url = cat.url, slug = cat.slug, layout = cat.list_layout, @@ -279,6 +282,7 @@ function process(global, meta) meta.url = resolve_url(global.site.url, global.file_out, meta.url or meta.file_out) meta.title = (meta.title and pandoc.utils.stringify(meta.title)) or "" meta.slug = slug(meta.title) + meta.schema_type = (meta.schema_type and pandoc.utils.stringify(meta.schema_type)) or "CreativeWork" if meta.list_order then meta.list_order = pandoc.utils.stringify(meta.list_order) end meta.list_layout = meta.list_layout and prep_layout(meta.list_layout) if meta.list_limit then meta.list_limit = tonumber(pandoc.utils.stringify(meta.list_limit)) end -- cgit v1.2.3-70-g09d2