Skip to content

feat: compact category index list + plain-text SEO descriptions#35

Open
Zodiarche wants to merge 2 commits into
mainfrom
feat/compact-category-list
Open

feat: compact category index list + plain-text SEO descriptions#35
Zodiarche wants to merge 2 commits into
mainfrom
feat/compact-category-list

Conversation

@Zodiarche

Copy link
Copy Markdown
Collaborator

Summary

Two related changes to the category index (generated-index) pages.

1. Compact list rendering

The stock 2-column grid of boxed, truncated cards did not scale. Sections with many guides (Ruby: 16 chapters, battle engine: 16 guides) became a long wall of cards, and a grid breaks the reading order of the numbered Ruby course. The pages now render a single scannable list — one row per entry (title + description + chevron).

Implemented by swizzling DocCardList, the only card component the theme marks as safe to eject, using only the public @docusaurus/plugin-content-docs/client API (no theme-common/internal imports), so it stays upgrade-tolerant. The previous global card CSS in custom.css is removed.

2. Plain-text frontmatter descriptions (SEO)

The description frontmatter feeds the <meta name="description"> tag and the cards, both rendered as raw text. Several Ruby chapters had Markdown in their descriptions, leaking **bold** / `code` into search snippets. The markers are stripped from every affected description in both locales (26 files, one line each); the body intro paragraphs keep their emphasis. CONTRIBUTING.md now requires plain-text descriptions to prevent regressions.

Test plan

  • bun run typecheck
  • bun run build (both locales, onBrokenLinks: throw) ✅
  • Built HTML verified: 0 <meta name="description"> contains Markdown across the site; cards render descriptions as plain text.
  • Recommended visual check in browser: bun start and bun run start:fr/ruby, /psdk/battle-engine.

Notes

  • No linked issue yet — link the relevant User/Technical Story if one exists.
  • Visual change (rows replace the card grid): screenshots to attach.

Zodiarche added 2 commits June 8, 2026 03:42
Swizzle the theme-safe DocCardList to replace the boxed 2-column card grid on generated-index pages with a single scannable list. The grid did not scale for sections with many guides (Ruby, battle engine) and broke the reading order of the numbered Ruby course.

Use only the public plugin-content-docs/client API to stay upgrade-tolerant, and drop the now-unused global card CSS.
The description frontmatter feeds the meta description tag and the new category cards, both rendered as raw text, so Markdown markers leaked into search snippets. Strip bold/code markers from the Ruby chapter descriptions in both locales; the body intro paragraphs keep their emphasis.

Update CONTRIBUTING to require plain-text descriptions.
@Zodiarche Zodiarche self-assigned this Jun 11, 2026
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