Skip to content

feat(blog): data-driven topics, sidebar, inline pills, taxonomy term pages#849

Merged
wu-sheng merged 1 commit into
masterfrom
blog-topics-data-driven
May 25, 2026
Merged

feat(blog): data-driven topics, sidebar, inline pills, taxonomy term pages#849
wu-sheng merged 1 commit into
masterfrom
blog-topics-data-driven

Conversation

@wu-sheng
Copy link
Copy Markdown
Member

Centralizes blog topics into a single data file, replaces the search-based filter on the blog index with a topic sidebar, generates the per-topic colors from data, ships /tags/<term>/ taxonomy pages, and remaps every blog post's frontmatter onto the canonical 11 labels.

Highlights

Single source of truth: data/blog_topics.yml

Each entry has name, EN intro, CN intro_zh, and color { bg / fg / border }. Adding a 12th topic is one append to this file — no template or SCSS changes required.

The data file drives:

  • Sidebar topic cards on /blog/ and /zh/ (description, count, link to /tags/<term>/).
  • The <style> block emitted by layouts/partials/blog-topic-styles.html containing one .blog-label[data-label="X"] rule per topic (included from blog/baseof.html, zh/baseof.html, tags/baseof.html).
  • Per-topic ordering on the sidebar (YAML order, skipping topics with zero posts).

Blog index — sidebar + chronological grid

  • Hero, then a right "Browse topics" sidebar with one compact card per topic (colored chip, count, intro). Each card opens /tags/<term>/.
  • Main column is the year-grouped post grid; pagination dropped here (tag pages paginate at 12 instead).
  • Below 992px the sidebar collapses above the grid as a horizontal scroll-snap row.

Blog detail page

  • Shadowed themes/docsy/layouts/blog/content.html: the theme's plain "Tags | Tracing, Metrics" list is replaced with inline colored .blog-label pills above the body, each linking to /tags/<term>/.
  • Right sidebar holds only the TOC (tags moved inline). Column widths rebalanced from col-xl-10 / col-xl-2col-xl-9 / col-xl-3 and the td-toc border-left removed, so the natural prose-to-TOC gap no longer reads as a blank vertical strip.
  • Polished .td-toc styling under .td-blog (uppercase label, brand-blue active TOC item, left-border accent), supports one extra nesting depth, hides the empty Docsy .td-page-meta div.

Tag taxonomy pages

  • New layouts/tags/baseof.html + layouts/tags/term.html render /tags/<term>/ in the same visual language as the blog list.
  • Hero shows the colored chip + "Posts tagged …" title + back link, then a card grid paginated at 12.
  • Pages are filtered to Section == "blog" so docs frontmatter tags: can't bleed in.

Content remap to the canonical 11

  • EN — every post in content/blog/* (82 files) rewritten to use only Release, AI, Tracing, Metrics, Logging, Profiling, Storage, Agents, Cloud Native, Engineering, Community. Max 3 tags per post, deduped, most-specific kept.
  • CN — same remap on content/zh/* (31 of 94 files actually changed).

Final tag distributions:

EN:  Community 27 · Agents 17 · Profiling 14 · Tracing 13 · Cloud Native 12 ·
     Engineering 10 · Metrics 10 · Storage 8 · Release 7 · Logging 4 · AI 4
CN:  Agents 11 · Tracing 10 · Profiling 6 · Storage 6 · Engineering 6 ·
     Cloud Native 5 · Community 5 · Metrics 4 · AI 4 · Release 2 · Logging 1

Verification

  • hugo builds clean (4589 EN pages + CN), no template errors.
  • Verified: /blog/ renders 11 sidebar cards with data-driven intros; /zh/ mirrors with intro_zh; /blog/<post>/ shows inline colored pills (theme's "Tags |" list gone); /tags/profiling/ and /tags/community/ (largest, paginated) render correctly.

…pages

Topics (name + EN/CN intro + label colors) now live in a single source of
truth: data/blog_topics.yml. The sidebar topic cards, inline post pills,
generated .blog-label[data-label] color rules and /tags/<term>/ pages are
all driven from that file — adding a 12th topic is one edit, no
template/SCSS changes required.

Blog index (EN + CN)
- Hero + right 'Browse topics' sidebar showing one card per topic with
  its description (data file), post count, and link to /tags/<term>/.
- Main column lists all posts grouped by year (pagination removed; the
  per-tag pages paginate at 12).
- Sidebar collapses above the grid as a horizontal scroll-snap row at
  <=992px.

Blog detail page
- Shadowed themes/docsy/layouts/blog/content.html: 'Tags | …' link list
  replaced with inline colored .blog-label pills, each linking to its
  /tags/<term>/ page.
- Right sidebar shows only the TOC (tags moved inline); column widths
  rebalanced to col-xl-9 + col-xl-3 and the awkward .td-toc border-left
  removed so the natural prose/TOC gap doesn't read as a blank strip.
- Polished .td-toc styling under .td-blog (uppercase label, brand-blue
  active item, left-border accent on hovered items, +1 nesting depth).
- Hidden the empty Docsy .td-page-meta that was leaving a gap above the
  TOC.

Tag taxonomy pages (new)
- layouts/tags/baseof.html + layouts/tags/term.html render /tags/<term>/
  styled like the blog list, filtered to Section==blog (so docs frontmatter
  tags can't bleed in), 12 cards per page with pagination.

Blog content remap
- Every blog post frontmatter (EN: 82 files, CN: 31 of 94) rewritten to
  use only the canonical 11 labels (Release, AI, Tracing, Metrics,
  Logging, Profiling, Storage, Agents, Cloud Native, Engineering,
  Community), max 3 tags per post, deduped.
@netlify
Copy link
Copy Markdown

netlify Bot commented May 25, 2026

Deploy Preview for skywalking-website-preview ready!

Name Link
🔨 Latest commit fec98ba
🔍 Latest deploy log https://app.netlify.com/projects/skywalking-website-preview/deploys/6a13fbd5fc2f2d0008ca5a2e
😎 Deploy Preview https://deploy-preview-849--skywalking-website-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@wu-sheng wu-sheng merged commit 833ce25 into master May 25, 2026
4 of 5 checks passed
@wu-sheng wu-sheng deleted the blog-topics-data-driven branch May 25, 2026 07:36
Sign up for free to 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