1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-10 00:39:09 +01:00
MLEM/Docs/overrides/conceptual.extension.js
2024-04-05 10:51:12 +02:00

8 lines
333 B
JavaScript

exports.preTransform = function (model) {
if (model._path.includes("index")) {
// reduce header levels by 1 to allow for TOC navigation
for (let i = 5; i >= 1; i--)
model.conceptual = model.conceptual.replaceAll(`<h${i}`, `<h${i + 1}`).replaceAll(`</h${i}`, `</h${i + 1}`);
}
return model;
};