diff options
| author | Volpeon <git@volpeon.ink> | 2021-12-16 18:29:18 +0100 | 
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2021-12-16 18:29:18 +0100 | 
| commit | 5f4cb1fd8b84e69092ac56a643b1618006f0442c (patch) | |
| tree | 1d2388ad69091163da498334e2de5c94c4e74dc7 /scripts/metadata_filter.lua | |
| parent | Fix it for real (diff) | |
| download | volpeon.ink-5f4cb1fd8b84e69092ac56a643b1618006f0442c.tar.gz volpeon.ink-5f4cb1fd8b84e69092ac56a643b1618006f0442c.tar.bz2 volpeon.ink-5f4cb1fd8b84e69092ac56a643b1618006f0442c.zip | |
Add thumbnails to cards
Diffstat (limited to 'scripts/metadata_filter.lua')
| -rw-r--r-- | scripts/metadata_filter.lua | 9 | 
1 files changed, 6 insertions, 3 deletions
| 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) | |||
| 187 | subtitle = p.subtitle, | 187 | subtitle = p.subtitle, | 
| 188 | date = p.date, | 188 | date = p.date, | 
| 189 | url = p.url, | 189 | url = p.url, | 
| 190 | thumbnail = p.thumbnail, | ||
| 190 | icon = p.icon or meta.icon, | 191 | icon = p.icon or meta.icon, | 
| 191 | post_icon = meta.list_post_icon, | 192 | post_icon = meta.list_post_icon, | 
| 192 | indicator = meta.list_read_indicators, | 193 | indicator = meta.list_read_indicators, | 
| @@ -202,6 +203,7 @@ function generate_list(meta) | |||
| 202 | subtitle = p.subtitle, | 203 | subtitle = p.subtitle, | 
| 203 | date = p.date, | 204 | date = p.date, | 
| 204 | url = p.url, | 205 | url = p.url, | 
| 206 | thumbnail = p.thumbnail, | ||
| 205 | icon = p.icon or cat.icon, | 207 | icon = p.icon or cat.icon, | 
| 206 | post_icon = cat.list_post_icon or meta.list_post_icon, | 208 | post_icon = cat.list_post_icon or meta.list_post_icon, | 
| 207 | indicator = cat.list_read_indicators, | 209 | indicator = cat.list_read_indicators, | 
| @@ -233,6 +235,7 @@ function generate_list(meta) | |||
| 233 | subtitle = p.subtitle, | 235 | subtitle = p.subtitle, | 
| 234 | category = c.title, | 236 | category = c.title, | 
| 235 | url = p.url, | 237 | url = p.url, | 
| 238 | thumbnail = p.thumbnail, | ||
| 236 | icon = p.icon or c.icon, | 239 | icon = p.icon or c.icon, | 
| 237 | post_icon = c.list_post_icon or cat.list_post_icon, | 240 | post_icon = c.list_post_icon or cat.list_post_icon, | 
| 238 | indicator = c.list_read_indicators, | 241 | indicator = c.list_read_indicators, | 
| @@ -293,9 +296,9 @@ function process(global, meta) | |||
| 293 | end | 296 | end | 
| 294 | end | 297 | end | 
| 295 | 298 | ||
| 296 | if meta.preview then | 299 | if meta.thumbnail then | 
| 297 | meta.preview = make_absolute(pandoc.utils.stringify(meta.preview), meta.file_out) | 300 | meta.thumbnail = make_absolute(pandoc.utils.stringify(meta.thumbnail), meta.file_out) | 
| 298 | meta.preview = resolve_url(global.site.url, global.file_out, meta.preview) | 301 | meta.thumbnail = resolve_url(global.site.url, global.file_out, meta.thumbnail) | 
| 299 | end | 302 | end | 
| 300 | 303 | ||
| 301 | if meta.menus and meta.menus.main then | 304 | if meta.menus and meta.menus.main then | 
