From bfa2621e2e3b0ad869c2adedc4883f75719e1074 Mon Sep 17 00:00:00 2001 From: Peter Langenkamp Date: Thu, 29 Oct 2020 13:19:21 +0100 Subject: [PATCH] only include files where the type attribute in the docusaurus header is either concept or term --- plugins/terminology-parser/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/terminology-parser/index.js b/plugins/terminology-parser/index.js index e2de64c..0bb4fe3 100644 --- a/plugins/terminology-parser/index.js +++ b/plugins/terminology-parser/index.js @@ -122,7 +122,7 @@ async function getGlossaryTerms(files) { //gather all metadata let { metadata } = parseMD(content) //keep only the required keys - if (metadata.title) { + if (metadata.title && (metadata.type == "concept" || metadata.type == "term")) { let glossaryContent = metadata.glossaryText; if (glossaryContent) { @@ -163,6 +163,8 @@ async function getGlossaryTerms(files) { glossaryText: glossaryContent, filepath: filepath.slice(1,-3), }); + } else { + console.log(metadata.type); } } return arr; -- GitLab