fix: filter draft posts from random, feed, and sitemap
This commit is contained in:
parent
b62e565d38
commit
23a267a242
3 changed files with 3 additions and 3 deletions
|
|
@ -19,7 +19,7 @@ interface TxtFile {
|
|||
}
|
||||
|
||||
export async function GET(context: APIContext) {
|
||||
const posts = await getCollection('posts');
|
||||
const posts = await getCollection('posts', ({ data }) => data.draft !== true);
|
||||
const bookmarks = yaml.load(bookmarksRaw) as Bookmark[];
|
||||
|
||||
const txtDir = path.join(process.cwd(), 'public/txt');
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ interface Bookmark {
|
|||
|
||||
export async function GET(context: APIContext) {
|
||||
const site = context.site?.origin ?? 'https://wynne.rs';
|
||||
const posts = await getCollection('posts');
|
||||
const posts = await getCollection('posts', ({ data }) => data.draft !== true);
|
||||
const bookmarks = yaml.load(bookmarksRaw) as Bookmark[];
|
||||
|
||||
const txtDir = path.join(process.cwd(), 'public/txt');
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ const SUBDOMAINS = [
|
|||
|
||||
export async function GET(context: APIContext) {
|
||||
const site = context.site?.origin ?? 'https://wynne.rs';
|
||||
const posts = await getCollection('posts');
|
||||
const posts = await getCollection('posts', ({ data }) => data.draft !== true);
|
||||
|
||||
const txtDir = path.join(process.cwd(), 'public/txt');
|
||||
const txtFiles = fs.existsSync(txtDir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue