feat(#330): Content UI refactor — guides & articles hub/detail pages, CMS editorial workflow#334
Merged
Merged
Conversation
- Create /articles/[slug].astro — SSR article detail page with breadcrumbs, author/date/reading-time meta, markdown rendering, inline conversion CTA, related articles section, Article + BreadcrumbList JSON-LD schemas - Update sitemap.xml.ts: add /guides and /articles to static routes; fetch and include all published guides and articles with lastmod dates - Create docs/content-ui.md: full developer reference covering routing, content hubs, detail page features, SEO, CMS API, editorial workflow, internal linking, accessibility, and testing commands All 93 CMS service tests pass." Co-authored-by: NickLetts2 <90337962+NickLetts2@users.noreply.github.com>
- Move `or_` import to module level in content.py - Escape LIKE wildcards (%, _) in search params to prevent unexpected results - Extract shared `calcReadingTime` and `extractCategories` utilities into lib/content/content-utils.ts; use in all four hub/detail pages - Restore explicit BlogPost interface in sitemap.xml.ts; remove inline type - Update docs/content-ui.md: WCAG 2.1 → WCAG 2.2 AA Co-authored-by: NickLetts2 <90337962+NickLetts2@users.noreply.github.com>
- Extract _escape_like() helper; escape [ and ] in LIKE wildcards - Extract _resolve_actor() helper; use across all workflow endpoints - Add create_content_item() to conftest.py; remove duplicate _create_item methods from TestContentPublicRoutes, TestSlugUniquenessPerType, TestPublicSearchAndRelated - Add lib/cms-client.ts with cmsBase/internalApiKey/cmsHeaders(); use in all four content pages (guides/articles hub + detail pages) - Add buildPaginationUrl() to content-utils.ts; use in guides/articles hub pages pagination links - Add explicit slug guard (if !slug return redirect) in detail pages - Document word-count approximation limitation in content-utils.ts All 93 CMS tests pass. Co-authored-by: NickLetts2 <90337962+NickLetts2@users.noreply.github.com>
… limit - Pass escape="\\" to all ilike() calls so the database correctly interprets the backslash-escaped LIKE pattern from _escape_like() - Add inline comment noting that not_in set is bounded to limit+1 items - Add sitemap comment about the 100-item-per-content-type cap Co-authored-by: NickLetts2 <90337962+NickLetts2@users.noreply.github.com>
- Export MS_PER_DAY = 86_400_000 from content-utils.ts; import and use it in guides/[slug].astro and articles/[slug].astro in place of the inline magic number - Change sitemap 100-item comment to a TODO for future pagination - Clarify not_in comment to reference validated limit constraint Co-authored-by: NickLetts2 <90337962+NickLetts2@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor content UI for blogs, guides, articles and CV pages
feat(#330): Content UI refactor — guides & articles hub/detail pages, CMS editorial workflow
May 30, 2026
NickLetts2
added a commit
that referenced
this pull request
Jun 1, 2026
…actor feat(#330): Content UI refactor — guides & articles hub/detail pages, CMS editorial workflow
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.
Extends the unified
ContentItemplatform (from #329) to deliver public content hubs for/guidesand/articles, a full editorial workflow API, and shared frontend utilities across the marketing site.CMS service
Approved,Scheduledadded toVALID_STATUSES?search=on all public and admin list endpoints;_escape_like()helper escapes%,_,[,]with backslash and passesescape="\\"to SQLAlchemyilike()so the DB honours the escape characterGET /content/{type}/related/{slug}): same-category items preferred, backfilled from others;not_inexclusion set is bounded bylimit(max 10)submit-review,approve,request-changes,schedule,unpublish,clone,delete— all use_resolve_actor()to fall back to JWT sub/emailWorkflowActionRequest,RequestChangesRequest,ScheduleContentItemRequest,CloneContentItemRequestcreate_content_item()extracted toconftest.pyto eliminate per-class_create_itemduplicationMarketing site — new pages
/guides/guides/[slug]/articles/articles/[slug]Sitemap updated to include static hub routes and dynamic published items for both types.
Shared utilities
src/lib/cms-client.ts—cmsBase,internalApiKey,cmsHeaders()used by all four content pagessrc/lib/content/content-utils.ts—calcReadingTime(),extractCategories(),buildPaginationUrl(),MS_PER_DAY(replaces inline86_400_000in both detail pages)Docs
docs/content-ui.md— routing structure, hub/template design, SEO features, CMS API reference, editorial workflow.