diff --git a/docusaurus/src/remark/specDecoration.js b/docusaurus/src/remark/specDecoration.js index 5df68b66193c..2817de919f71 100644 --- a/docusaurus/src/remark/specDecoration.js +++ b/docusaurus/src/remark/specDecoration.js @@ -53,10 +53,13 @@ async function injectDefaultAirbyteLibSection(vfile, ast) { }); } }); + if (!added) { + throw new Error(`Could not find a changelog heading in ${vfile.path} to add the default airbyte-lib section. This connector won't have a reference section. Make sure there is either a ## Changelog section or add a manual reference section.`); + } } function isChangelogHeading(node) { - return node.depth === 2 && node.children.length === 1 && node.children[0].value === "Changelog"; + return node.depth === 2 && node.children.length === 1 && node.children[0].value.toLowerCase() === "changelog"; }