diff options
Diffstat (limited to 'scripts/metadata_filter.lua')
-rw-r--r-- | scripts/metadata_filter.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua index 499cf3e..21698bd 100644 --- a/scripts/metadata_filter.lua +++ b/scripts/metadata_filter.lua | |||
@@ -260,14 +260,18 @@ function Meta(meta) | |||
260 | 260 | ||
261 | meta.file_out = get_file_out(meta.rewrites, meta.content_dir, | 261 | meta.file_out = get_file_out(meta.rewrites, meta.content_dir, |
262 | meta.output_dir, meta.file_in) | 262 | meta.output_dir, meta.file_in) |
263 | if meta.relative_to == nil then | 263 | if meta.relative_to == nil then meta.relative_to = meta.file_in end |
264 | meta.relative_to = meta.file_in | ||
265 | end | ||
266 | meta.relative_to_out = get_file_out(meta.rewrites, meta.content_dir, | 264 | meta.relative_to_out = get_file_out(meta.rewrites, meta.content_dir, |
267 | meta.output_dir, meta.relative_to) | 265 | meta.output_dir, meta.relative_to) |
268 | 266 | ||
269 | meta.url = resolve_url(meta.site.url, meta.output_dir, meta.relative_to_out, | 267 | meta.url = resolve_url(meta.site.url, meta.output_dir, meta.relative_to_out, |
270 | meta.file_out) | 268 | meta.file_out) |
269 | if meta.preview ~= nil then | ||
270 | meta.preview = pandoc.utils.stringify(meta.preview) | ||
271 | meta.preview = meta.file_out:gsub("/index%.html$", "/" .. meta.preview) | ||
272 | meta.preview = resolve_url(meta.site.url, meta.output_dir, | ||
273 | meta.relative_to_out, meta.preview) | ||
274 | end | ||
271 | 275 | ||
272 | meta.date = format_date(meta.date) | 276 | meta.date = format_date(meta.date) |
273 | if meta.last_update ~= nil then | 277 | if meta.last_update ~= nil then |