From 7050b8141eae25a0cdc394fd195e66dd9af29ad7 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 18 Jun 2022 08:47:28 +0200 Subject: Improved exhibit --- scripts/metadata_filter.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua index 5e71994..4f7200a 100644 --- a/scripts/metadata_filter.lua +++ b/scripts/metadata_filter.lua @@ -290,16 +290,22 @@ function process(global, meta) if meta.list_limit then meta.list_limit = tonumber(pandoc.utils.stringify(meta.list_limit)) end if meta.position then meta.position = pandoc.utils.stringify(meta.position) end + if meta.images then + for i = 1, #meta.images do + local image = meta.images[i] + image.url = make_absolute(pandoc.utils.stringify(image.url), meta.file_out) + image.url = resolve_url(global.site.url, global.file_out, image.url) + end + end + if meta.feed then if meta.file_out:match(".html$") then meta.feed = { - url = resolve_url(global.site.url, global.file_out, - meta.file_out:gsub(".html$", ".xml")), + url = resolve_url(global.site.url, global.file_out, meta.file_out:gsub(".html$", ".xml")), } else meta.page = { - url = resolve_url(global.site.url, global.file_out, - meta.file_out:gsub(".xml$", ".html")), + url = resolve_url(global.site.url, global.file_out, meta.file_out:gsub(".xml$", ".html")), } end end -- cgit v1.2.3-70-g09d2