From ec63ae2dc309c6039cbbc7eb246108ae9279408b Mon Sep 17 00:00:00 2001 From: bikram dey <62688713+modhack2003@users.noreply.github.com> Date: Thu, 8 Oct 2026 13:04:48 +0530 Subject: [PATCH] Redirect plural blog URLs and clarify draft visibility --- next.config.ts | 3 +++ src/components/admin/dashboard.tsx | 4 ++-- src/components/admin/insights-panel.tsx | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/next.config.ts b/next.config.ts index 43dc18d..553d6f1 100644 --- a/next.config.ts +++ b/next.config.ts @@ -48,6 +48,9 @@ const nextConfig: NextConfig = { output: 'standalone', // Handle Prisma client generation serverExternalPackages: ['@prisma/client', 'prisma'], + async redirects() { + return [{ source: '/blogs/:path*', destination: '/blog/:path*', permanent: true }]; + }, async headers() { return [ { diff --git a/src/components/admin/dashboard.tsx b/src/components/admin/dashboard.tsx index 32d5abb..3ca0a85 100644 --- a/src/components/admin/dashboard.tsx +++ b/src/components/admin/dashboard.tsx @@ -154,7 +154,7 @@ const COLLECTIONS: Record = { }, blog: { title: 'Blog posts', - description: 'Only published posts appear on the site. Content supports simple Markdown (# headings, **bold**, lists, `code`, links).', + description: 'Drafts are hidden from the homepage and /blog. To make a post visible, open Edit, enable Published, and Save. Content supports simple Markdown (# headings, **bold**, lists, `code`, links).', endpoint: '/api/blog', addLabel: 'New post', fields: [ @@ -166,7 +166,7 @@ const COLLECTIONS: Record = { { name: 'tags', label: 'Tags', type: 'tags', wide: true }, ], itemTitle: (i: Item) => String(i.title), - itemMeta: (i: Item) => `${i.published ? 'Published' : 'Draft'} · /blog/${i.slug}`, + itemMeta: (i: Item) => `${i.published ? 'Published · visible on site' : 'Draft · hidden from site'} · /blog/${i.slug}`, }, }; diff --git a/src/components/admin/insights-panel.tsx b/src/components/admin/insights-panel.tsx index a005cbf..a14d2bb 100644 --- a/src/components/admin/insights-panel.tsx +++ b/src/components/admin/insights-panel.tsx @@ -37,7 +37,7 @@ export function InsightsPanel({ onImported }: { onImported: () => void }) { void sync(false)}>Sync now void sync(true)}>Import past month -

{state.autoPublish ? 'New briefs publish automatically. Past-month imports always remain drafts.' : 'New briefs are saved as drafts for review.'} Last success: {formatDate(state.lastSuccess, { dateStyle: 'medium', timeStyle: 'short' })} · {state.lastCreated} added.{state.running && ' An import is running.'}

+

{state.autoPublish ? 'Future daily briefs publish automatically. Existing drafts and past-month imports need publishing in the editor below.' : 'New briefs are saved as drafts and stay hidden from the site. To show one, open Edit below, enable Published, and Save.'} Last success: {formatDate(state.lastSuccess, { dateStyle: 'medium', timeStyle: 'short' })} · {state.lastCreated} added.{state.running && ' An import is running.'}

{state.lastError &&

{state.lastError}

} } {error &&

{error}

}