Skip to content

Commit

Permalink
Fix meta and samples.json anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
marwie committed Jun 19, 2023
1 parent 6a3e5db commit c7847f6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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
});
Expand All @@ -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);
Expand Down

0 comments on commit c7847f6

Please sign in to comment.