Generate llms.txt in website/public for GitHub Pages

Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-03 01:46:18 +00:00
parent 2d996d8ab2
commit 7e23ac9527
5 changed files with 18 additions and 527 deletions

View File

@@ -214,13 +214,19 @@ function generateLlmsTxt() {
/**
* Main function to generate and write the llms.txt file
* @param {string} [outputDir] - Optional output directory. Defaults to repository root.
*/
function main() {
function main(outputDir = ROOT_FOLDER) {
console.log("Generating llms.txt file...");
try {
const content = generateLlmsTxt();
const outputPath = path.join(ROOT_FOLDER, "llms.txt");
const outputPath = path.join(outputDir, "llms.txt");
// Ensure output directory exists
if (!fs.existsSync(outputDir)) {
fs.mkdirSync(outputDir, { recursive: true });
}
fs.writeFileSync(outputPath, content, "utf8");
@@ -242,4 +248,6 @@ function main() {
}
}
main();
// Support command-line argument for output directory
const outputDir = process.argv[2];
main(outputDir);