From 5f4cb1fd8b84e69092ac56a643b1618006f0442c Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 16 Dec 2021 18:29:18 +0100 Subject: Add thumbnails to cards --- scripts/metadata_filter.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua index a3675d9..25fbc50 100644 --- a/scripts/metadata_filter.lua +++ b/scripts/metadata_filter.lua @@ -187,6 +187,7 @@ function generate_list(meta) subtitle = p.subtitle, date = p.date, url = p.url, + thumbnail = p.thumbnail, icon = p.icon or meta.icon, post_icon = meta.list_post_icon, indicator = meta.list_read_indicators, @@ -202,6 +203,7 @@ function generate_list(meta) subtitle = p.subtitle, date = p.date, url = p.url, + thumbnail = p.thumbnail, icon = p.icon or cat.icon, post_icon = cat.list_post_icon or meta.list_post_icon, indicator = cat.list_read_indicators, @@ -233,6 +235,7 @@ function generate_list(meta) subtitle = p.subtitle, category = c.title, url = p.url, + thumbnail = p.thumbnail, icon = p.icon or c.icon, post_icon = c.list_post_icon or cat.list_post_icon, indicator = c.list_read_indicators, @@ -293,9 +296,9 @@ function process(global, meta) end end - if meta.preview then - meta.preview = make_absolute(pandoc.utils.stringify(meta.preview), meta.file_out) - meta.preview = resolve_url(global.site.url, global.file_out, meta.preview) + if meta.thumbnail then + meta.thumbnail = make_absolute(pandoc.utils.stringify(meta.thumbnail), meta.file_out) + meta.thumbnail = resolve_url(global.site.url, global.file_out, meta.thumbnail) end if meta.menus and meta.menus.main then -- cgit v1.2.3-70-g09d2