Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
{
Expand Down
4 changes: 2 additions & 2 deletions src/components/admin/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const COLLECTIONS: Record<string, CollectionEditorProps> = {
},
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: [
Expand All @@ -166,7 +166,7 @@ const COLLECTIONS: Record<string, CollectionEditorProps> = {
{ 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}`,
},
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/admin/insights-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function InsightsPanel({ onImported }: { onImported: () => void }) {
<Btn busy={busy} onClick={() => void sync(false)}>Sync now</Btn>
<Btn disabled={busy} variant="outline" onClick={() => void sync(true)}>Import past month</Btn>
</div>
<p className="mt-3 text-xs text-muted-foreground">{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.'}</p>
<p className="mt-3 text-xs text-muted-foreground">{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.'}</p>
{state.lastError && <p role="alert" className="mt-2 text-xs text-destructive">{state.lastError}</p>}
</>}
{error && <p role="alert" className="mt-2 text-xs text-destructive">{error}</p>}
Expand Down
Loading