Skip to content

Add Ghost CMS feature parity: RSS feed, sitemap, robots.txt, post revisions, taxonomy descriptions, members visibility, password-protected posts, code injection#2

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/improve-architectural-design
Draft

Add Ghost CMS feature parity: RSS feed, sitemap, robots.txt, post revisions, taxonomy descriptions, members visibility, password-protected posts, code injection#2
Copilot wants to merge 3 commits intomainfrom
copilot/improve-architectural-design

Conversation

Copy link

Copilot AI commented Feb 21, 2026

Penstack was missing several standard blog CMS features present in Ghost. This PR adds the most impactful ones with minimal changes across schema, API routes, and Next.js conventions.

Discovery & SEO

  • RSS 2.0 feed (/rss.xml) — top-50 published posts with title, permalink, pubDate, summary, author, category, and tags; 1-hour revalidation
  • XML sitemap (/sitemap.xml) — Next.js 14 native sitemap.ts; covers home, /articles, all published posts (via existing generatePostUrl permalink formatter), categories, and tags
  • robots.txt (/robots.txt) — Next.js 14 native robots.ts; blocks /dashboard/, /api/, /auth/; references sitemap

Post Revision History

New PostRevisions table snapshots title, content, summary, and revised_by before every PUT update, inside a transaction:

await db.transaction(async (tx) => {
  await tx.insert(postRevisions).values({ post_id: oldPost.id, ... });
  await tx.update(posts).set({ ...body }).where(...);
});

revision_number is DB-level AUTO_INCREMENT to eliminate race conditions on concurrent edits. New GET /api/posts/[slugOrPostId]/revisions returns paginated history (requires posts:edit).

Schema Additions

Table Change
Posts visibility enum gains "members" tier (public | members | private); new access_password varchar(255)
Tags description varchar(500)
Categories description varchar(500)
PostRevisions New table

Tag and category POST/PUT routes updated to accept and persist description.

Site Settings

Added codeInjectionHead and codeInjectionFoot to DEFAULT_SETTINGS and SiteSettings type — the root layout can read and render these via dangerouslySetInnerHTML to match Ghost's code injection feature.

Migration Required

npm run db:gen && npm run db:migrate
# or for dev: npm run db:push

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link

vercel bot commented Feb 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
devvick-blog Ready Ready Preview, Comment Feb 21, 2026 6:22pm

@netlify
Copy link

netlify bot commented Feb 21, 2026

Deploy Preview for skynewsng ready!

Name Link
🔨 Latest commit 2229dec
🔍 Latest deploy log https://app.netlify.com/projects/skynewsng/deploys/6999f7799cc40700083a89cb
😎 Deploy Preview https://deploy-preview-2--skynewsng.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Co-authored-by: codewithveek <65457498+codewithveek@users.noreply.github.com>
Copilot AI changed the title [WIP] Review architectural design and security for blog CMS Add security headers, rate limiting, and input validation to critical API routes Feb 21, 2026
Copilot AI requested a review from codewithveek February 21, 2026 17:55
…isions, taxonomy descriptions, members visibility, code injection settings

Co-authored-by: codewithveek <65457498+codewithveek@users.noreply.github.com>
Copilot AI changed the title Add security headers, rate limiting, and input validation to critical API routes Add Ghost CMS feature parity: RSS feed, sitemap, robots.txt, post revisions, taxonomy descriptions, members visibility, password-protected posts, code injection Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants