diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/metadata_filter.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua index 0ff7429..c7f4d4a 100644 --- a/scripts/metadata_filter.lua +++ b/scripts/metadata_filter.lua | |||
@@ -259,6 +259,7 @@ end | |||
259 | function process(global, parent, meta) | 259 | function process(global, parent, meta) |
260 | meta.namespace = resolve_namespace(meta.namespace) | 260 | meta.namespace = resolve_namespace(meta.namespace) |
261 | meta.file_out = pandoc.utils.stringify(meta.file_out):gsub("^out", "") | 261 | meta.file_out = pandoc.utils.stringify(meta.file_out):gsub("^out", "") |
262 | meta.redirect = meta.url and true | ||
262 | meta.url = meta.url and pandoc.utils.stringify(meta.url) | 263 | meta.url = meta.url and pandoc.utils.stringify(meta.url) |
263 | meta.url = resolve_url(global.site.url, global.file_out, meta.url or meta.file_out) | 264 | meta.url = resolve_url(global.site.url, global.file_out, meta.url or meta.file_out) |
264 | meta.title = (meta.title and pandoc.utils.stringify(meta.title)) or "" | 265 | meta.title = (meta.title and pandoc.utils.stringify(meta.title)) or "" |
@@ -292,7 +293,7 @@ function process(global, parent, meta) | |||
292 | meta.pages = | 293 | meta.pages = |
293 | process_pages(global, { parent = parent, meta = meta }, meta.list_order, meta.pages) | 294 | process_pages(global, { parent = parent, meta = meta }, meta.list_order, meta.pages) |
294 | meta.depth = (meta.pages and find_depth(meta.pages.all)) or "0" | 295 | meta.depth = (meta.pages and find_depth(meta.pages.all)) or "0" |
295 | meta.layout = prep_layout(meta.layout or resolve_layout(meta.depth)) | 296 | meta.layout = prep_layout(meta.layout or (meta.redirect and "redirect") or resolve_layout(meta.depth)) |
296 | 297 | ||
297 | if meta.date then | 298 | if meta.date then |
298 | meta.date = format_date(meta.date) | 299 | meta.date = format_date(meta.date) |