From 84dcb995a86e5fcd904bd31a692492768ddefdc1 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 27 Dec 2021 13:35:27 +0100 Subject: Simplified thumbnails --- content/projects/doodles/2021-lazy-firefox/index.md | 2 +- content/projects/drawings/2021-cute-ava/index.md | 2 +- content/projects/drawings/2021-eeveelutions/index.md | 2 +- content/projects/drawings/2021-lycanroc-ava/index.md | 2 +- content/projects/drawings/2021-refsheet/index.md | 2 +- content/projects/drawings/2021-spooky-ava-1/index.md | 2 +- content/projects/drawings/2021-spooky-ava-2/index.md | 2 +- content/projects/emojis/blobfox/index.md | 2 +- content/projects/emojis/bunhd/index.md | 2 +- content/projects/emojis/vlpn/index.md | 2 +- scripts/metadata_filter.lua | 12 +++++++++++- 11 files changed, 21 insertions(+), 11 deletions(-) diff --git a/content/projects/doodles/2021-lazy-firefox/index.md b/content/projects/doodles/2021-lazy-firefox/index.md index 311ea5e..f97a139 100644 --- a/content/projects/doodles/2021-lazy-firefox/index.md +++ b/content/projects/doodles/2021-lazy-firefox/index.md @@ -1,7 +1,7 @@ --- title: Lazy Firefox date: 2021-10-16 -thumbnail: thumbnail.png +thumbnail: png --- ![](firefox_lazy.png) diff --git a/content/projects/drawings/2021-cute-ava/index.md b/content/projects/drawings/2021-cute-ava/index.md index 26d0dfc..43171a9 100644 --- a/content/projects/drawings/2021-cute-ava/index.md +++ b/content/projects/drawings/2021-cute-ava/index.md @@ -1,7 +1,7 @@ --- title: Cute Avatar date: 2021-03-01 -thumbnail: thumbnail.png +thumbnail: png --- ![](ava.png) diff --git a/content/projects/drawings/2021-eeveelutions/index.md b/content/projects/drawings/2021-eeveelutions/index.md index 98c071e..b169ee0 100644 --- a/content/projects/drawings/2021-eeveelutions/index.md +++ b/content/projects/drawings/2021-eeveelutions/index.md @@ -1,7 +1,7 @@ --- title: Eeveelutions date: 2021-08-19 -thumbnail: thumbnail.png +thumbnail: png --- ![](eevee.png) diff --git a/content/projects/drawings/2021-lycanroc-ava/index.md b/content/projects/drawings/2021-lycanroc-ava/index.md index 9bf1a5c..275df4d 100644 --- a/content/projects/drawings/2021-lycanroc-ava/index.md +++ b/content/projects/drawings/2021-lycanroc-ava/index.md @@ -1,7 +1,7 @@ --- title: Lycanroc Avatar date: 2021-10-19 -thumbnail: thumbnail.png +thumbnail: png --- ![](ava.png) diff --git a/content/projects/drawings/2021-refsheet/index.md b/content/projects/drawings/2021-refsheet/index.md index c4c9bdd..2163fac 100644 --- a/content/projects/drawings/2021-refsheet/index.md +++ b/content/projects/drawings/2021-refsheet/index.md @@ -1,7 +1,7 @@ --- title: Reference Sheet Views date: 2021-10-06 -thumbnail: thumbnail.png +thumbnail: png --- ![](bottom.png) diff --git a/content/projects/drawings/2021-spooky-ava-1/index.md b/content/projects/drawings/2021-spooky-ava-1/index.md index 7a988c3..5099dcc 100644 --- a/content/projects/drawings/2021-spooky-ava-1/index.md +++ b/content/projects/drawings/2021-spooky-ava-1/index.md @@ -1,7 +1,7 @@ --- title: \"Spooky\" Avatar date: 2021-10-07 -thumbnail: thumbnail.png +thumbnail: png --- ![](ava.png) diff --git a/content/projects/drawings/2021-spooky-ava-2/index.md b/content/projects/drawings/2021-spooky-ava-2/index.md index 9854adf..84064db 100644 --- a/content/projects/drawings/2021-spooky-ava-2/index.md +++ b/content/projects/drawings/2021-spooky-ava-2/index.md @@ -1,7 +1,7 @@ --- title: Spooky Avatar date: 2021-10-14 -thumbnail: thumbnail.png +thumbnail: png --- ![](ava.png) diff --git a/content/projects/emojis/blobfox/index.md b/content/projects/emojis/blobfox/index.md index b7733c9..22c4a93 100644 --- a/content/projects/emojis/blobfox/index.md +++ b/content/projects/emojis/blobfox/index.md @@ -1,7 +1,7 @@ --- title: Blobfox date: 2020-09-04 -thumbnail: thumbnail.jpg +thumbnail: jpg --- ![](screenshot.png) diff --git a/content/projects/emojis/bunhd/index.md b/content/projects/emojis/bunhd/index.md index 900d910..4181b75 100644 --- a/content/projects/emojis/bunhd/index.md +++ b/content/projects/emojis/bunhd/index.md @@ -1,7 +1,7 @@ --- title: BunHD date: 2019-09-30 -thumbnail: thumbnail.png +thumbnail: png --- ![](screenshot.png) diff --git a/content/projects/emojis/vlpn/index.md b/content/projects/emojis/vlpn/index.md index 02b8e38..9cec213 100644 --- a/content/projects/emojis/vlpn/index.md +++ b/content/projects/emojis/vlpn/index.md @@ -1,7 +1,7 @@ --- title: vlpn date: 2021-07-23 -thumbnail: thumbnail.png +thumbnail: png --- ![](preview.png) diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua index b16ab92..413ded5 100644 --- a/scripts/metadata_filter.lua +++ b/scripts/metadata_filter.lua @@ -19,6 +19,15 @@ function pandoc.List:take(n) return result end +function file_exists(name) + local f = io.open(name, "r") + if f ~= nil then + io.close(f) + return true + end + return false +end + function format_date(date) if not date then return date end @@ -297,7 +306,8 @@ function process(global, meta) end if meta.thumbnail then - meta.thumbnail = make_absolute(pandoc.utils.stringify(meta.thumbnail), meta.file_out) + meta.thumbnail = make_absolute("thumbnail." .. pandoc.utils.stringify(meta.thumbnail), + meta.file_out) meta.thumbnail = resolve_url(global.site.url, global.file_out, meta.thumbnail) end -- cgit v1.2.3-70-g09d2