astro-pure 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/utils/server.ts +1 -1
package/package.json
CHANGED
package/utils/server.ts
CHANGED
|
@@ -5,7 +5,7 @@ type Collections = CollectionEntry<CollectionKey>[]
|
|
|
5
5
|
export const prod = import.meta.env.PROD
|
|
6
6
|
|
|
7
7
|
/** Note: this function filters out draft posts based on the environment */
|
|
8
|
-
export async function getBlogCollection(contentType: CollectionKey) {
|
|
8
|
+
export async function getBlogCollection(contentType: CollectionKey = 'blog') {
|
|
9
9
|
return await getCollection(contentType, ({ data }: CollectionEntry<typeof contentType>) => {
|
|
10
10
|
// Not in production & draft is not false
|
|
11
11
|
return prod ? !data.draft : true
|