Replace Notion integration with Neon Postgres and add password-protected admin portal#71
Open
Psavvas wants to merge 3 commits into
Open
Replace Notion integration with Neon Postgres and add password-protected admin portal#71Psavvas wants to merge 3 commits into
Psavvas wants to merge 3 commits into
Conversation
…ted admin portal Site content (projects, blog posts, short links, and the About page's 'Now' section) now lives in a Neon Postgres database instead of Notion. A new admin portal at /admin — guarded by an ADMIN_PASSWORD login with signed HttpOnly session cookies — manages all of it, with Markdown editors and live preview for project pages and blog posts. - db/schema.sql: idempotent script to run once in the Neon SQL editor (tables, triggers, indexes, seed content, sample drafts) - src/lib: Neon HTTP driver client, shared Markdown pipeline (image grids, YouTube/Vimeo embeds, project top-link buttons preserved from the Notion renderer), content queries, auth helpers - src/middleware.ts: session check for all /admin routes - src/pages/admin: dashboard, project/blog CRUD with draft/published visibility, redirects manager, Now-section editor, Markdown preview API - Switched to SSR via @astrojs/vercel so admin edits appear on the live site immediately; /404 and /contact stay prerendered - Replaced the build-time sitemap with a dynamic /sitemap.xml and added robots.txt (disallows /admin) - Removed @notionhq/client, notion-to-md, and @astrojs/sitemap Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015eygzg5gLC3xBv1g1Sw6Rt
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The first deploy 500ed because DATABASE_URL wasn't configured and every server-rendered page threw at request time. Public content getters now catch database errors, log them, and render the page with empty content (About falls back to its built-in copy; unknown slugs go to /404). Admin pages render a 'Could not reach the database' notice with setup instructions instead of crashing, and the editor forms still load so the real error surfaces on save. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015eygzg5gLC3xBv1g1Sw6Rt
…vvas.com The admin navbar packed everything against the left edge with a dead gap before the right-side controls. It now mirrors the public site's navbar: brand left, links centred (active page highlighted, no wrapping), actions right, in a fixed-height row that stacks cleanly on small screens. Also replaces every paulsavvas.me reference with paulsavvas.com — the canonical site URL (og:url, sitemap, robots.txt), admin copy, README, schema comments, and package name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015eygzg5gLC3xBv1g1Sw6Rt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Site content (projects, blog posts, short links, and the About page's
'Now' section) now lives in a Neon Postgres database instead of Notion.
A new admin portal at /admin — guarded by an ADMIN_PASSWORD login with
signed HttpOnly session cookies — manages all of it, with Markdown
editors and live preview for project pages and blog posts.
(tables, triggers, indexes, seed content, sample drafts)
grids, YouTube/Vimeo embeds, project top-link buttons preserved from
the Notion renderer), content queries, auth helpers
visibility, redirects manager, Now-section editor, Markdown preview API
site immediately; /404 and /contact stay prerendered
robots.txt (disallows /admin)
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_015eygzg5gLC3xBv1g1Sw6Rt