forked from Qortal/q-blog
1.3 KiB
1.3 KiB
Q-Blog v0.1.0 — Multiple Blogs per Name
Release date: 2025-08-21
This release introduces multi-blog support per Name with a minimal, backwards-compatible routing update and improved navigation.
Highlights
- User blogs page:
/:user/blogslists all blogs for a Name, with owner actions to Edit/Create. - Smart redirect for
/:user:- Exactly 1 blog →
/:user/:blog(history replace) - 0 or >1 blogs →
/:user/blogs
- Exactly 1 blog →
- Header: “My Blogs” dropdown (lists all your blogs + “Create new blog”); when 0 blogs, shows “Create Blog” button.
- Name clicks: Clicking an author name/avatar now navigates to
/:user(which resolves to the blogs list unless a single blog exists). - Editor flow: You can create and edit posts per blog; switching blogs via the header updates the active blog context.
Developer notes
- New files:
src/utils/blogs.ts,src/pages/UserBlogs/UserBlogs.tsx,src/pages/UserBlogs/NameRootRedirect.tsx. - Updated routes in
src/App.tsx. GlobalWrappernow fetches current user blogs and wires selection to setcurrentBlog.Navbarupdated to a dropdown menu with accessible patterns (popover + list + focus return).- Tests cover redirect behavior, page rendering, and header menu states.
No data migrations. Deep links to /:user/:blog/... continue to work.