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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils/server.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-pure",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "A simple, clean but powerful blog theme build by astro.",
5
5
  "type": "module",
6
6
  "author": "CWorld",
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