fix: SEO-1 (#29)

This commit is contained in:
Eric Tuvesson
2023-09-22 12:35:24 +02:00
committed by GitHub
parent d392dd0407
commit f3b8bb4d3b
111 changed files with 222 additions and 203 deletions

View File

@@ -1,5 +1,3 @@
const { recursiveBuildSidebarData } = require('./dataHelpers');
const NodeType = {
Visual: 'is-visual',
Data: 'is-data',
@@ -658,7 +656,7 @@ function recursiveBuildNodeOverviewData(item) {
} else {
return {
label: item.label,
docUrl: item.id,
docUrl: '/nodes/' + item.id,
nodeType: item.nodeType,
key: item.label,
};
@@ -679,6 +677,23 @@ exports.getNodePageData = function () {
});
};
function recursiveBuildSidebarData(item) {
if ('items' in item) {
// is a category
return {
type: 'category',
label: item.label,
items: item.items.map(recursiveBuildSidebarData),
}
} else {
return {
type: 'doc',
label: item.label,
id: item.id + "/README",
}
}
}
exports.getNodeSidebarData = function () {
return nodeData.map(recursiveBuildSidebarData);
};