@pointsharp/antora-llm-generator 1.1.2 → 1.1.3
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/llm-generator.js +9 -1
- package/package.json +1 -1
package/llm-generator.js
CHANGED
|
@@ -240,7 +240,15 @@ function buildSectionsFromNavigatorData(navDataFile, siteUrl, pagesByPath, logge
|
|
|
240
240
|
return componentSections;
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
-
|
|
243
|
+
// Convert JavaScript object notation to valid JSON
|
|
244
|
+
// The navigator extension outputs JavaScript (unquoted keys), not JSON
|
|
245
|
+
let jsData = jsonMatch[1];
|
|
246
|
+
// Quote unquoted property names: name: → "name":
|
|
247
|
+
jsData = jsData.replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)(\s*:)/g, '$1"$2"$3');
|
|
248
|
+
// Convert single quotes to double quotes for string values
|
|
249
|
+
jsData = jsData.replace(/'([^']*)'/g, '"$1"');
|
|
250
|
+
|
|
251
|
+
const siteNavigationData = JSON.parse(jsData);
|
|
244
252
|
if (debug) logger.info(`Parsed ${siteNavigationData.length} components from navigator data`);
|
|
245
253
|
|
|
246
254
|
// Process each component
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pointsharp/antora-llm-generator",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.3",
|
|
5
5
|
"description": "An Antora extension to generate llms.txt files for LLM consumption following llmstxt.org specification.",
|
|
6
6
|
"main": "llm-generator.js",
|
|
7
7
|
"keywords": [
|