summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2022-06-16 13:42:26 +0200
committerVolpeon <git@volpeon.ink>2022-06-16 13:42:26 +0200
commitaa4c54317b51dc14ba65d2e091b701ae6640ee80 (patch)
tree1b78a533299bc1d39e4c2eef611396a241e685c7 /scripts
parentUpdate (diff)
downloadvolpeon.ink-aa4c54317b51dc14ba65d2e091b701ae6640ee80.tar.gz
volpeon.ink-aa4c54317b51dc14ba65d2e091b701ae6640ee80.tar.bz2
volpeon.ink-aa4c54317b51dc14ba65d2e091b701ae6640ee80.zip
WIP: Adding metadata
Diffstat (limited to 'scripts')
-rw-r--r--scripts/metadata_filter.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua
index b78c480..3fc6c66 100644
--- a/scripts/metadata_filter.lua
+++ b/scripts/metadata_filter.lua
@@ -189,6 +189,7 @@ function d1_page_to_list_item(meta, p)
189 subtitle = p.subtitle, 189 subtitle = p.subtitle,
190 date = p.date, 190 date = p.date,
191 last_update = p.last_update, 191 last_update = p.last_update,
192 schema_type = p.schema_type,
192 position = p.position, 193 position = p.position,
193 url = p.url, 194 url = p.url,
194 slug = p.slug, 195 slug = p.slug,
@@ -206,6 +207,7 @@ function d2_page_to_list_item(meta, cat, p, set_cat_title)
206 category = set_cat_title and cat.title, 207 category = set_cat_title and cat.title,
207 date = p.date, 208 date = p.date,
208 last_update = p.last_update, 209 last_update = p.last_update,
210 schema_type = p.schema_type,
209 position = p.position, 211 position = p.position,
210 url = p.url, 212 url = p.url,
211 slug = p.slug, 213 slug = p.slug,
@@ -226,6 +228,7 @@ function cat_to_list_cat(cat, allItems)
226 description = (cat.description and pandoc.MetaBlocks(pandoc.Para(cat.description))) or 228 description = (cat.description and pandoc.MetaBlocks(pandoc.Para(cat.description))) or
227 (not cat.no_description and cat.content), 229 (not cat.no_description and cat.content),
228 last_update = cat.last_update, 230 last_update = cat.last_update,
231 schema_type = cat.schema_type,
229 url = cat.url, 232 url = cat.url,
230 slug = cat.slug, 233 slug = cat.slug,
231 layout = cat.list_layout, 234 layout = cat.list_layout,
@@ -279,6 +282,7 @@ function process(global, meta)
279 meta.url = resolve_url(global.site.url, global.file_out, meta.url or meta.file_out) 282 meta.url = resolve_url(global.site.url, global.file_out, meta.url or meta.file_out)
280 meta.title = (meta.title and pandoc.utils.stringify(meta.title)) or "" 283 meta.title = (meta.title and pandoc.utils.stringify(meta.title)) or ""
281 meta.slug = slug(meta.title) 284 meta.slug = slug(meta.title)
285 meta.schema_type = (meta.schema_type and pandoc.utils.stringify(meta.schema_type)) or "CreativeWork"
282 if meta.list_order then meta.list_order = pandoc.utils.stringify(meta.list_order) end 286 if meta.list_order then meta.list_order = pandoc.utils.stringify(meta.list_order) end
283 meta.list_layout = meta.list_layout and prep_layout(meta.list_layout) 287 meta.list_layout = meta.list_layout and prep_layout(meta.list_layout)
284 if meta.list_limit then meta.list_limit = tonumber(pandoc.utils.stringify(meta.list_limit)) end 288 if meta.list_limit then meta.list_limit = tonumber(pandoc.utils.stringify(meta.list_limit)) end