Repository navigation
Guest blog post submissions (footer link, signed-in form, staff email) - #52
Merged
Merged
Conversation
A footer link, "Submit a post", leads to `/submit-post`. The page is public; the form needs a signed-in account (the first Google sign-in creates one). Submissions live in a new `apps/blog/` app as a review queue: posts are MDX in the frontend, so accepting one publishes nothing by itself. - The form takes a title, summary, tags, a markdown body in `@uiw/react-md-editor` (client-only, previewing through our own `<Markdown>`), and a byline: name, role, bio and up to three links. - `POST /blog/submissions` stores the post as `pending` and queues `post_submission_staff_notice` to every active staff account after commit, with an excerpt and a link to the admin. - Limits: a 300-60,000 character body, 3 pending posts and 5 submissions a day per account, 8 tags, author links through `validate_external_url`. - The admin shows the post read-only, accepts or rejects it through `services.review`, and offers it as a `.mdx` file with the frontmatter filled in and `draft: true`. - `/activity` gains "Posts you submitted", with the status and the editor's note. `/submit-post` joins the sitemap. - DEVELOPMENT.md and CLAUDE.md describe the flow.
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.
Summary
Readers can now pitch a guest post. A footer link, Submit a post, opens
/submit-post. The page is public, but the form needs a signed-in account; the first Google sign-in creates one.Posts are MDX built into the frontend, so a submission is a review queue row and never a page. Accepting one publishes nothing by itself.
@uiw/react-md-editor. The editor loads client-only and previews through our own<Markdown>, so raw HTML stays as text.apps/blog/app.POST /blog/submissionsstores aPostSubmissionaspending.GET /blog/submissionslists the caller's own submissions.services.py, and refusals reach the form as a 422detail.post_submission_staff_noticegoes to every active staff account after commit. It carries an excerpt and an admin link.validate_external_url..env.example.draft: true./activitygains a "Posts you submitted" section with the status and the editor's note./submit-postis added to the sitemap. DEVELOPMENT.md and CLAUDE.md describe the flow.Publishing an accepted post (manual)
.mdxfile from the admin.src/lib/blog/authors.tsand add their id toauthors.frontend/content/blog/and commit it.Test plan
make backend-test, without the full benchmark suite (as CI runs it), passes: 612 passed. This includes new API, services, email and admin tests.make frontend-testpasses: 934 passed.make lintpasses.next buildcompiles/submit-post.make schemaleaves the generated files unchanged./submit-postshows the sign-in prompt, and the API returns 401..mdxdownload in the admin.