From c7847f6ac4cf308046a9491ff42a498ebb436b32 Mon Sep 17 00:00:00 2001 From: Marcel Wiessler Date: Mon, 19 Jun 2023 16:36:30 +0200 Subject: [PATCH] Fix meta and samples.json anchors --- .../.vuepress/plugins/generate-samples-meta/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/.vuepress/plugins/generate-samples-meta/index.js b/documentation/.vuepress/plugins/generate-samples-meta/index.js index 8739dc0ec..7cf6148db 100644 --- a/documentation/.vuepress/plugins/generate-samples-meta/index.js +++ b/documentation/.vuepress/plugins/generate-samples-meta/index.js @@ -16,10 +16,10 @@ let tagsJson = {}; let tagsPath = ""; export const generateMetaPlugin = (args, ctx) => { - const options = args.options; // console.log(options.plugins); const outputDirectory = options.source + '/.vuepress/public/meta'; + console.log("OUTPUT DIRECTORY", outputDirectory) if (!fs.existsSync(outputDirectory)) fs.mkdirSync(outputDirectory); samplesJsonPath = outputDirectory + '/samples.json'; @@ -90,7 +90,7 @@ const sampleMetaParser = (md, options) => { "name": sampleName, "page": page, "anchor": anchor, - "absolute-url": baseUrl + "/" + page + anchor, + "absolute-url": baseUrl + "/" + page + "#" + anchor, "description": sample.description, tags: metaInfo.tags }); @@ -105,7 +105,7 @@ const sampleMetaParser = (md, options) => { arr.push({ "page": page, "anchor": anchor, - "absolute-url": baseUrl + "/" + page + anchor, + "absolute-url": baseUrl + "/" + page + "#" + anchor, }); } write(tagsPath, tagsJson);