@pointsharp/antora-llm-generator 1.1.0 → 1.1.2
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 +3 -2
- package/package.json +1 -1
package/llm-generator.js
CHANGED
|
@@ -50,7 +50,7 @@ module.exports.register = function (context, { config }) {
|
|
|
50
50
|
// Two navigation sources are supported:
|
|
51
51
|
// 1. Antora native navigation (from nav.adoc files)
|
|
52
52
|
// 2. Navigator extension (if installed, creates site-navigation-data.js)
|
|
53
|
-
const navDataFile = siteCatalog.getFiles().find(f => f.out?.path
|
|
53
|
+
const navDataFile = siteCatalog.getFiles().find(f => f.out?.path?.endsWith('site-navigation-data.js'));
|
|
54
54
|
const useNavigatorData = !!navDataFile;
|
|
55
55
|
|
|
56
56
|
if (debug) {
|
|
@@ -233,7 +233,8 @@ function buildSectionsFromNavigatorData(navDataFile, siteUrl, pagesByPath, logge
|
|
|
233
233
|
const navContent = navDataFile.contents.toString();
|
|
234
234
|
|
|
235
235
|
// Extract JSON array from: siteNavigationData=[...]
|
|
236
|
-
|
|
236
|
+
// Use [\s\S] instead of . to match across newlines
|
|
237
|
+
const jsonMatch = navContent.match(/siteNavigationData=(\[[\s\S]*\])/);
|
|
237
238
|
if (!jsonMatch) {
|
|
238
239
|
logger.warn("Could not parse site-navigation-data.js format");
|
|
239
240
|
return componentSections;
|
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.2",
|
|
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": [
|