From d8bda573008ab1f23e30cb4f1533468090e5dddb Mon Sep 17 00:00:00 2001 From: Volpeon Date: Tue, 10 Jan 2023 09:04:11 +0100 Subject: Better asset handling; paragraph fix for new Pandoc versions; updated emojis --- scripts/page.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'scripts/page.lua') diff --git a/scripts/page.lua b/scripts/page.lua index 33982ba..606288a 100644 --- a/scripts/page.lua +++ b/scripts/page.lua @@ -77,10 +77,19 @@ function cat_to_list_cat(meta, allItems) local items = allItems:take(limit) local omitted = #allItems - #items + local description = nil + + if meta.description then + description = pandoc.Para(meta.description) + elseif not meta.no_description then + description = meta.content:filter(function (el) + return el.tag ~= "Str" or el.text ~= "ΒΆ" + end) + end + return { title = meta.title, - description = (meta.description and pandoc.MetaBlocks(pandoc.Para(meta.description))) or - (not meta.no_description and meta.content), + description = pandoc.MetaBlocks(description), last_update = meta.last_update, schema_type = meta.schema_type, url = meta.url, -- cgit v1.2.3-54-g00ecf