@voicenter-team/nuxt-llms-generator 0.1.8 → 0.1.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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readFileSync, writeFileSync, unlinkSync } from 'fs';
|
|
2
2
|
import { join, dirname, basename } from 'path';
|
|
3
|
+
import { slugify } from 'transliteration';
|
|
3
4
|
import Mustache from 'mustache';
|
|
4
5
|
import Anthropic from '@anthropic-ai/sdk';
|
|
5
6
|
import { createHash } from 'crypto';
|
|
@@ -1391,16 +1392,17 @@ class LLMSFilesGenerator {
|
|
|
1391
1392
|
return `Information about ${urlItem.url}`;
|
|
1392
1393
|
}
|
|
1393
1394
|
sanitizeUrlForFilename(url) {
|
|
1394
|
-
if (url === "/")
|
|
1395
|
+
if (!url || url === "/")
|
|
1395
1396
|
return "index";
|
|
1396
|
-
}
|
|
1397
1397
|
let filename = url.replace(/^\//, "").replace(/\/$/, "").replace(/\//g, "-").replace(/--+/g, "-").replace(/^-+|-+$/g, "");
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1398
|
+
filename = slugify(filename, {
|
|
1399
|
+
lowercase: true,
|
|
1400
|
+
separator: "-"
|
|
1401
|
+
});
|
|
1402
|
+
if (!filename)
|
|
1403
|
+
filename = `index-${Date.now()}`;
|
|
1404
|
+
if (/^[.-]/.test(filename))
|
|
1405
|
+
filename = `page-${filename.replace(/^[.-]+/, "")}`;
|
|
1404
1406
|
return filename;
|
|
1405
1407
|
}
|
|
1406
1408
|
getLLMSFilePath(fullPath) {
|
package/dist/module.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voicenter-team/nuxt-llms-generator",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "Nuxt 3 module for automatically generating AI-optimized documentation files (llms.txt, llms-full.txt, and individual .md files) from Umbraco CMS data using Anthropic's Claude API.",
|
|
5
5
|
"repository": "https://github.com/VoicenterTeam/nuxt-llms-generator",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"mustache": "^4.2.0",
|
|
42
42
|
"node-html-markdown": "^1.3.0",
|
|
43
43
|
"npm": "^11.6.0",
|
|
44
|
+
"transliteration": "^2.3.5",
|
|
44
45
|
"zod": "^4.1.9"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|