@qualcomm-ui/mdx-vite 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js
CHANGED
|
@@ -5782,12 +5782,20 @@ async function generateLlmsTxt(pages, projectName, description, baseUrl) {
|
|
|
5782
5782
|
const lines = [
|
|
5783
5783
|
getIntroLines(pages, projectName, description, baseUrl)
|
|
5784
5784
|
];
|
|
5785
|
-
lines.push("## Documentation Content");
|
|
5786
5785
|
lines.push("");
|
|
5787
5786
|
for (const page of pages) {
|
|
5788
|
-
|
|
5787
|
+
const content = page.content.split("\n").map((line) => {
|
|
5788
|
+
if (line.startsWith("#")) {
|
|
5789
|
+
return `#${line}`;
|
|
5790
|
+
}
|
|
5791
|
+
return line;
|
|
5792
|
+
});
|
|
5793
|
+
if (content.every((line) => !line.trim())) {
|
|
5794
|
+
continue;
|
|
5795
|
+
}
|
|
5796
|
+
lines.push(`## ${page.title}`);
|
|
5789
5797
|
lines.push("");
|
|
5790
|
-
lines.push(
|
|
5798
|
+
lines.push(content.join("\n"));
|
|
5791
5799
|
lines.push("");
|
|
5792
5800
|
}
|
|
5793
5801
|
return lines.join("\n");
|