this repo has no description

Fix headings and output path

Changed files
+3 -5
src
+3 -3
src/index.ts
···
name: string;
}
-
const output = path.join(process.cwd(), 'out');
-
await fs.mkdir(output, { recursive: true });
+
const outputPath = path.join(process.cwd(), 'out');
+
await fs.mkdir(outputPath, { recursive: true });
async function generate(site: Site) {
log('crawl', site.name);
···
}
const output = await concatMarkdown(contents);
const formatted = await formatMarkdown(output);
-
const file = path.join(output, `llms-full-${site.name}.txt`);
+
const file = path.join(outputPath, `llms-full-${site.name}.txt`);
await fs.writeFile(file, formatted, 'utf-8');
}
-2
src/unified.ts
···
} else if (node.type === 'link' || node.type === 'linkReference') {
if (node.children.length === 0)
parent.children.splice(index, 1);
-
if (parent.children.length === 1)
-
parent.children.length = 0;
} else if (node.type === 'html') {
parent.children.splice(index, 1);
} else if (node.type === 'heading') {