~/blog/tags
- ls tags/
-
-
diff --git a/src/pages/tags/[...tag].astro b/src/pages/tags/[...tag].astro
index 865a49a..3b74126 100644
--- a/src/pages/tags/[...tag].astro
+++ b/src/pages/tags/[...tag].astro
@@ -4,9 +4,7 @@ import {getCollection} from "astro:content";
import ArticleList from "../../components/ArticleList.astro";
export async function getStaticPaths() {
- const allPosts = await getCollection('posts', ({ data }) => {
- return import.meta.env.PROD ? data.draft !== true : true;
-});
+ const allPosts = await getCollection('posts');
const uniqueTags = [...new Set(allPosts.map((post: any) => post.data.tags ? post.data.tags : []).flat())];
return uniqueTags.map((tag) => {
const filteredPosts = allPosts.filter((post: any) => post.data.tags?.includes(tag));
diff --git a/src/pages/twtxt.txt.js b/src/pages/twtxt.txt.js
index 9311550..6af2c49 100644
--- a/src/pages/twtxt.txt.js
+++ b/src/pages/twtxt.txt.js
@@ -1,9 +1,7 @@
import { getCollection } from 'astro:content';
export async function GET(context) {
- const posts = await getCollection('posts', ({ data }) => {
- return import.meta.env.PROD ? data.draft !== true : true;
-});
+ const posts = await getCollection('posts');
// Sort posts by date (newest first)
posts.sort((a, b) => new Date(b.data.date).getTime() - new Date(a.data.date).getTime());
diff --git a/src/plugins/heatmapdata/local.js b/src/plugins/heatmapdata/local.js
index 470a3c7..0c04586 100644
--- a/src/plugins/heatmapdata/local.js
+++ b/src/plugins/heatmapdata/local.js
@@ -1,9 +1,7 @@
import { getCollection, render } from 'astro:content';
async function fetchPostsData() {
- const posts = await getCollection('posts', ({ data }) => {
- return import.meta.env.PROD ? data.draft !== true : true;
-});
+ const posts = await getCollection('posts');
const entriesData = {};
for (const post of posts) {