From f615ec90f5daad2d33c57eddc9a5a392b15f204e Mon Sep 17 00:00:00 2001 From: Felix Khafizov Date: Sat, 16 Sep 2023 00:39:34 +0300 Subject: [PATCH] Move source url to frontmatter --- index.js | 2 ++ theme.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/index.js b/index.js index 66e99e6..65d458e 100644 --- a/index.js +++ b/index.js @@ -34,6 +34,8 @@ const onRendererPageEnd = let prependix = `--- title: '${event.model.name}' +sources: +${event.model?.sources.map(source => ` - ${source.url}`).join('\n')} ${objectToFrontmatter(frontmatterObject)} --- diff --git a/theme.js b/theme.js index d7abd4d..4b501dc 100644 --- a/theme.js +++ b/theme.js @@ -40,4 +40,6 @@ class CustomMarkdownThemeContext extends MarkdownThemeRenderContext { return constructedUrl } + + sources = () => '' }