Fix buildLlmsTxt.ts
This commit is contained in:
Vendored
+6
-6
@@ -37,16 +37,16 @@ import { buildLocalizedPath } from '../i18n/index.js';
|
||||
});
|
||||
const name = settings.siteName?.trim() || 'Website';
|
||||
const description = settings.siteDescription?.trim();
|
||||
// NO where:{_status} filter — collections without drafts enabled don't
|
||||
// register the _status field, and querying it throws
|
||||
// "path cannot be queried: _status" (a real bug report). Draft filtering
|
||||
// happens in memory below, which is safe for every collection. Same as
|
||||
// buildSitemapEntries and generateStaticParams.
|
||||
const result = await payload.find({
|
||||
collection: pagesSlug,
|
||||
depth: 0,
|
||||
limit: 1000,
|
||||
locale: loc,
|
||||
where: {
|
||||
_status: {
|
||||
not_equals: 'draft'
|
||||
}
|
||||
}
|
||||
locale: loc
|
||||
});
|
||||
const lines = [
|
||||
`# ${name}`,
|
||||
|
||||
Reference in New Issue
Block a user