Skip to content

Edit post, 404 page, seo, locale, home page - #690

Merged
feruzm merged 4 commits into
developfrom
editp
Mar 4, 2026
Merged

Edit post, 404 page, seo, locale, home page#690
feruzm merged 4 commits into
developfrom
editp

Conversation

@feruzm

@feruzmferuzm commented Mar 4, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Blog owners can edit posts via a rich editor and a dedicated /edit page.
    • 404 Not Found page with a link back to the blog.
    • RSS feed link added to blog navigation.
  • Improvements

    • Post updates save and redirect to the updated post.
    • Improved SEO: Open Graph and Twitter meta tags auto-populated per post.
    • Home now redirects to blog posts.
    • Expanded translations across supported locales.

@coderabbitai

coderabbitaiBot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@feruzm has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 50 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 30314302-d5ab-42d8-9777-4e8e1f18a5e1

📥 Commits

Reviewing files that changed from the base of the PR and between c2d5d51 and a40cdf6.

📒 Files selected for processing (3)
  • apps/self-hosted/src/features/blog/layout/blog-navigation.tsx
  • apps/self-hosted/src/index.tsx
  • apps/self-hosted/src/utils/rss-feed-url.ts
📝 Walkthrough

Walkthrough

Adds an in-app post editing feature (route, editor, and update hook), expands translations, introduces a NotFound page and RSS link, centralizes document meta handling, and redirects index to /blog?filter=posts.

Changes

Cohort / File(s)Summary
Translations
apps/self-hosted/src/core/i18n.ts
Extended TranslationKey union with new keys (page_not_found, page_not_found_description, back_to_blog, edit_post, updating, update, editor_start_writing, editor_post_title) and added localized strings for all locales.
Edit route & pages
apps/self-hosted/src/routes/edit.$author.$permlink.tsx, apps/self-hosted/src/routeTree.gen.ts, apps/self-hosted/src/routes/__root.tsx, apps/self-hosted/src/routes/index.tsx
Added /edit/$author/$permlink file route and propagated types, implemented edit route component with auth/ownership checks and data fetching, wired NotFound component into root, and changed index to redirect to /blog?filter=posts.
Editor & publish API
apps/self-hosted/src/features/publish/components/edit-post-editor.tsx, apps/self-hosted/src/features/publish/hooks/use-update-post.ts, apps/self-hosted/src/features/publish/index.ts
New EditPostEditor (TipTap-based, markdown↔HTML conversion, title/tags UI) and useUpdatePost hook (validation, tag normalization, mutation, redirect); both re-exported from publish index.
Blog UI & navigation
apps/self-hosted/src/features/blog/components/blog-post-header.tsx, apps/self-hosted/src/features/blog/components/blog-post-page.tsx, apps/self-hosted/src/features/blog/layout/blog-navigation.tsx
Conditional edit link for blog owners in post header; memoized ogImage/ogDescription extraction in post page with useDocumentMeta usage; added RSS feed link in blog navigation; minor layout adjustments for TTS/edit alignment.
Document meta & app entry
apps/self-hosted/src/utils/use-document-meta.ts, apps/self-hosted/src/index.tsx
Added useDocumentMeta hook to manage Open Graph/Twitter meta tags (with cleanup) and centralized meta tag helpers in app entry, plus RSS autodiscovery link creation.

Sequence Diagram(s)

sequenceDiagram
participant User
participant EditRoute as "Edit Route\n(/edit/$author/$permlink)"
participant Editor as "EditPostEditor\n(TipTap)"
participant UpdateHook as "useUpdatePost"
participant API as "Backend API"
participant Router
User->>EditRoute: Navigate to /edit/$author/$permlink
EditRoute->>EditRoute: Check auth & ownership
EditRoute->>API: Fetch post data
API-->>EditRoute: Return post entry
EditRoute->>Editor: Render with initialTitle, initialBody, initialTags
User->>Editor: Modify title/body/tags
Editor->>UpdateHook: Submit update (permlink, parentPermlink, title, body, tags)
UpdateHook->>UpdateHook: Validate/authenticate & normalize tags
UpdateHook->>API: commentMutation.mutateAsync (update)
API-->>UpdateHook: Success
UpdateHook->>Router: Navigate to /$author/$permlink
Router-->>User: Redirect to updated post
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

patch

🐰 I hopped to fix a post today,
With TipTap leaves and tags to play,
I set meta tags and a graceful route,
Fed RSS crumbs for every bout,
Now hop — your edited tale’s on display! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 11.76% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title directly corresponds to the main changes in the PR: adding edit post functionality, a 404 page, SEO improvements, new translation keys (locale), and home page redirect.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch editp

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

Sign up for freeto 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.

1 participant

@feruzm