From 479127f2ef73aa878723a9ed78a5b3f310fc5573 Mon Sep 17 00:00:00 2001 From: dallyh Date: Thu, 22 Feb 2024 23:03:41 +0100 Subject: [PATCH] Show hidden posts in dev mode --- src/components/astro/blog/BlogPostPreview.astro | 12 ++++++++++++ .../astro/blog/SmallBlogPostPreview.astro | 13 +++++++++++++ src/content/categories/other.yaml | 8 ++++++++ .../posts/cs/2023-01-01-my-fourth-blog-post.md | 2 +- .../posts/cs/2023-01-01-my-second-blog-post.md | 2 +- .../posts/cs/2023-01-01-my-third-blog-post.md | 2 +- .../posts/cs/2023-01-01-typography-example.md | 1 + .../posts/cs/2023-12-29-localized-slug-title.md | 2 +- .../cs/2024-01-02-test-post-from-identity.md | 15 --------------- .../posts/cs/2024-01-07-test-post-from-cms.md | 2 +- .../2024-01-13-test-post-with-external-image.md | 2 +- .../posts/en/2023-01-01-my-fourth-blog-post.md | 2 +- .../posts/en/2023-01-01-my-second-blog-post.md | 2 +- .../posts/en/2023-01-01-my-third-blog-post.md | 2 +- .../posts/en/2023-01-01-typography-example.md | 1 + .../posts/en/2023-12-29-localized-slug-title.md | 2 +- .../en/2024-01-02-test-post-from-identity.md | 15 --------------- .../posts/en/2024-01-07-test-post-from-cms.md | 2 +- .../2024-01-13-test-post-with-external-image.md | 2 +- .../[...lang]/blog/categories/[...category].astro | 6 +++--- .../[...lang]/blog/posts/[...slug]/index.png.ts | 11 +++++------ src/utils/getFilteredPostsCollection.ts | 15 +++++++++++++-- 22 files changed, 68 insertions(+), 53 deletions(-) create mode 100644 src/content/categories/other.yaml delete mode 100644 src/content/posts/cs/2024-01-02-test-post-from-identity.md delete mode 100644 src/content/posts/en/2024-01-02-test-post-from-identity.md diff --git a/src/components/astro/blog/BlogPostPreview.astro b/src/components/astro/blog/BlogPostPreview.astro index 7fd1f57..cb5483a 100644 --- a/src/components/astro/blog/BlogPostPreview.astro +++ b/src/components/astro/blog/BlogPostPreview.astro @@ -20,6 +20,7 @@ await loadNamespaces(locale, ["blog"]); ---
+ {post.data.hidden &&
DEV MODE HIDDEN
} {post.data.title}
@@ -43,6 +44,16 @@ await loadNamespaces(locale, ["blog"]);