-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate llms.txt on docs build #3600
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
|
||
// List to track files with issues | ||
let filesWithIssues = []; | ||
|
||
// Exceptions list configuration | ||
const EXCEPTIONS_FILE_PATH = path.join(process.cwd(), 'plugins/frontmatter-validation/frontmatter-exceptions.txt'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added ability to have exceptions list for the frontmatter checker as yarn docusaurus build
tries to build all locales. The translations docs don't yet have the slugs, we did the translations before we started enforcing this.
|
||
// Write llms.txt file | ||
try { | ||
fs.writeFileSync(path.join(outDir, "llms.txt"), llmsTxt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
llms.txt gets put in the same directory as our robots.txt. (build directory of docusaurus)
plugins/llms-txt-plugin.ts
Outdated
}; | ||
} | ||
|
||
export default pluginLlmsTxt; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
Summary
Adds custom Docusaurus plugin to generate an llms.txt file on build.
Checklist