docs: add starlight (#1859)

Co-authored-by: uncenter <[email protected]>
Co-authored-by: Hammy <[email protected]>
Co-authored-by: WalkQuackBack <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-08-31 19:02:22 -04:00
1 parent d5e22ed281
commit 84c0edf1ce
46 files changed
+5967 -522

No files matched your search

-24
View File
@@ -7,27 +7,3 @@ export function writeWithPreamble(
"# THIS FILE IS AUTOGENERATED. DO NOT EDIT IT BY HAND.\n" + fileContent,
);
}
export function updateReadme({
readme,
section,
newContent,
}: {
readme: string;
section: string;
newContent: string;
}): string {
const preamble =
"<!-- The following section is auto-generated, do not edit. -->";
const startMarker = `<!-- AUTOGEN:${section.toUpperCase()} START -->`;
const endMarker = `<!-- AUTOGEN:${section.toUpperCase()} END -->`;
const wrapped = `${startMarker}\n${preamble}\n${newContent}\n${endMarker}`;
if (!(readme.includes(startMarker) && readme.includes(endMarker))) {
throw new Error("Markers not found in README.md");
}
const pre = readme.split(startMarker)[0];
const end = readme.split(endMarker)[1];
return pre + wrapped + end;
}