mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-28 22:18:52 +00:00
more debug
This commit is contained in:
@@ -38,7 +38,7 @@ nodes.forEach(node => {
|
|||||||
let next = child.nextElementSibling;
|
let next = child.nextElementSibling;
|
||||||
|
|
||||||
while(next && next.tagName !== 'H2') {
|
while(next && next.tagName !== 'H2') {
|
||||||
if (next) {
|
if (next && next.textContent) {
|
||||||
paragraphOut.content += next.textContent;
|
paragraphOut.content += next.textContent;
|
||||||
}
|
}
|
||||||
next = next.nextElementSibling;
|
next = next.nextElementSibling;
|
||||||
@@ -73,7 +73,7 @@ nodes.forEach(node => {
|
|||||||
console.log('====================================');
|
console.log('====================================');
|
||||||
}
|
}
|
||||||
|
|
||||||
nue.push(paragraphOut);
|
nue.push(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -85,7 +85,6 @@ nodes.forEach(node => {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const merged = [...nodes, ...nue];
|
|
||||||
|
|
||||||
fs.writeFileSync('public/final.algolia.json', JSON.stringify(merged));
|
fs.writeFileSync('public/final.algoia.json', JSON.stringify(nue));
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user