fix: fix reference docs toc generation (#7832)

This commit is contained in:
Maribeth Bottorff
2024-02-05 15:09:25 -08:00
committed by GitHub
parent 506970ab30
commit 66980fe983

View File

@@ -95,7 +95,11 @@ const createToc = function(done) {
const files = fs.readdirSync(DOCS_DIR);
const map = buildAlternatePathsMap(files);
const referencePath = '/blockly/reference/js';
fs.writeSync(toc, 'toc:\n');
const tocHeader = `toc:
- title: Overview
path: /blockly/reference/js/blockly.md\n`;
fs.writeSync(toc, tocHeader);
// Generate a section of TOC for each section/heading in the overview file.
const sections = fileContent.split('##');