extract-from-sitemap 0.0.9 → 0.0.10
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/cli.js +2 -2
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -541,7 +541,7 @@ function getPathPrefix(topLevelOutDir, sourceOutDir) {
|
|
|
541
541
|
}
|
|
542
542
|
|
|
543
543
|
const relativePath = path.relative(resolvedTopLevel, resolvedSource);
|
|
544
|
-
return relativePath
|
|
544
|
+
return relativePath || "";
|
|
545
545
|
}
|
|
546
546
|
|
|
547
547
|
/**
|
|
@@ -571,7 +571,7 @@ function generateCombinedLlmsTxt(allSources) {
|
|
|
571
571
|
if (source.keepOriginalUrls) {
|
|
572
572
|
link = file.originalUrl;
|
|
573
573
|
} else {
|
|
574
|
-
link = source.pathPrefix + path;
|
|
574
|
+
link = source.pathPrefix + (path.startsWith("/") ? path : "/" + path);
|
|
575
575
|
}
|
|
576
576
|
|
|
577
577
|
combinedTxt += `- [${title}](${link}) (${file.tokens} tokens)${description}\n`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "extract-from-sitemap",
|
|
3
3
|
"bin": "cli.js",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.10",
|
|
5
5
|
"main": "mod.js",
|
|
6
6
|
"description": "A module and CLI that allows extracting all pages from a sitemap into markdown and a llms.txt, using Parallel.ai APIs.",
|
|
7
7
|
"files": [
|