support published value
This commit is contained in:
@@ -7,6 +7,7 @@ import BlogCard from '@components/blog/BlogCard.astro';
|
||||
|
||||
const posts = await directus.request(
|
||||
readItems('posts', {
|
||||
filter: { published: { _eq: true } },
|
||||
fields: ['*'],
|
||||
sort: ['-published_date'],
|
||||
})
|
||||
|
@@ -25,6 +25,7 @@ export type Post = {
|
||||
tags: string[];
|
||||
category: string;
|
||||
selected: boolean;
|
||||
published: boolean;
|
||||
content: string;
|
||||
image: string;
|
||||
image_alt: string;
|
||||
|
@@ -13,6 +13,7 @@ import blogImg from '@images/autumn_tree.png';
|
||||
const global = await directus.request(readSingleton('site_global'));
|
||||
const posts = await directus.request(
|
||||
readItems('posts', {
|
||||
filter: { status: { _eq: true } },
|
||||
fields: ['*'],
|
||||
sort: ['-published_date'],
|
||||
})
|
||||
|
@@ -21,6 +21,7 @@ const { category } = Astro.props;
|
||||
const global = await directus.request(readSingleton('site_global'));
|
||||
const posts = await directus.request(
|
||||
readItems('posts', {
|
||||
filter: { published: { _eq: true } },
|
||||
fields: ['*'],
|
||||
sort: ['-published_date'],
|
||||
})
|
||||
|
@@ -14,6 +14,7 @@ import categoryImg from '@images/autumn_bench.png';
|
||||
const global = await directus.request(readSingleton('site_global'));
|
||||
const posts = await directus.request(
|
||||
readItems('posts', {
|
||||
filter: { published: { _eq: true } },
|
||||
fields: ['*'],
|
||||
sort: ['-published_date'],
|
||||
})
|
||||
|
@@ -23,6 +23,7 @@ export async function GET(context: APIContext) {
|
||||
// Load the content collection entries to add to our RSS feed.
|
||||
const posts = await directus.request(
|
||||
readItems('posts', {
|
||||
filter: { published: { _eq: true } },
|
||||
fields: ['*'],
|
||||
sort: ['-published_date'],
|
||||
})
|
||||
|
Reference in New Issue
Block a user