Fix semtree: use virtualBranches false so i.bonsai is root

This commit is contained in:
Davide Scaini
2026-05-06 22:54:10 +02:00
parent 8cb806a082
commit 6d7c02e312
+3 -2
View File
@@ -8,8 +8,9 @@ import * as semtree from 'semtree';
export async function buildBonsai(): Promise<SemTree | undefined> { export async function buildBonsai(): Promise<SemTree | undefined> {
// init vars // init vars
const opts = { const opts = {
// if set to 'false', make sure to extract urls of index docs below // 'false' means i.bonsai itself is the root; all top-level list items are its children.
virtualBranches: true, // 'true' would require exactly one top-level item in the file (the virtual root).
virtualBranches: false,
// semtree options: https://github.com/wikibonsai/semtree?tab=readme-ov-file#options // semtree options: https://github.com/wikibonsai/semtree?tab=readme-ov-file#options
}; };
const bonsaiText: any = {}; // { filename: content } hash const bonsaiText: any = {}; // { filename: content } hash