Skip to content

fix: unify docs style and fix cross-references#27

Draft
shenxianpeng wants to merge 2 commits into
mainfrom
fix/docs-consistency
Draft

fix: unify docs style and fix cross-references#27
shenxianpeng wants to merge 2 commits into
mainfrom
fix/docs-consistency

Conversation

@shenxianpeng

Copy link
Copy Markdown
Member

Summary

This PR addresses documentation style inconsistencies across the cpp-linter organization hub site, aligning it with the cpp-linter-action MkDocs configuration (which is the most mature sub-project site).

Issues found across all cpp-linter repos

# Problem Severity Fixed in this PR?
1 Primary color mismatch: Hub uses indigo, cpp-linter-action uses blue 🔴 High ✅ Yes
2 Broken cross-links: getting-started.md pointed to non-existent cpp-linter.github.io/cpp-linter/ and cpp-linter.github.io/cpp-linter-rs/ 🔴 High ✅ Yes
3 Missing MkDocs features: Hub lacked content.code.copy, search.suggest, search.share, navigation.footer, toc.follow that cpp-linter-action has 🟡 Medium ✅ Yes
4 Missing markdown extensions: No admonition, pymdownx.highlight, toc permalink 🟡 Medium ✅ Yes
5 Unused CSS bloat: ~200 lines of CSS (heart, badge, social, pulse, stats-grid) copied from cpp-linter-action but never used by the hub site 🟢 Low ✅ Yes
6 clang-tools-pip uses Sphinx (RST), not MkDocs — different theme (sphinx_immaterial vs material), different look & feel 🔴 High ❌ Separate repo
7 Logo/favicon files differ: clang-tools-pip uses new_favicon.ico vs favicon.ico elsewhere 🟡 Medium ❌ Separate repo
8 README format inconsistency: clang-tools-pip is RST, everything else is Markdown. Header casing varies ("C/C++ Linter Action" vs "cpp-linter-hooks" vs "Clang Tools Docker image") 🟡 Medium ❌ Separate repos
9 "Used By" sections differ in format and org list between hub, cpp-linter-action, and cpp-linter-hooks 🟢 Low ❌ Separate repos
10 No back-navigation: Sub-project doc sites lack a prominent "← Back to cpp-linter hub" link 🟡 Medium ❌ Separate repos

Changes in this PR

1. mkdocs.yml — Unified theme config

  • Changed primary palette from indigoblue (matches cpp-linter-action)
  • Removed toc.integrate (incompatible with toc.follow)
  • Added features to match cpp-linter-action: navigation.footer, content.code.annotate, content.code.copy, content.tabs.link, search.suggest, search.share, toc.follow
  • Added extensions: admonition, pymdownx.highlight, pymdownx.inlinehilite, pymdownx.snippets, toc with permalink

2. docs/getting-started.md — Fixed cross-references

  • cpp-linter CLI link → PyPI (pypi.org/project/cpp-linter/) instead of non-existent GitHub Pages site
  • cpp-linter-rs link → GitHub repo instead of non-existent GitHub Pages site
  • Added cpp-linter-rs to the quick-reference table (was missing)
  • Fixed clang-tools-wheel link to use GitHub Pages

3. docs/index.md — Version update

  • Updated pre-commit rev from v1.4.0 to v1.5.0 (current latest)

4. docs/stylesheets/extra.css — CSS cleanup

  • Removed unused @keyframes gradientShift (orphaned)
  • Removed unused .stats-grid / .stat styles (HTML was commented out)
  • Removed unused @keyframes heart + .mdx-heart / .mdx-badge / .mdx-social styles (only used by cpp-linter-action)
  • Removed unused @keyframes pulse (not used by hub)

Follow-up work (separate PRs in other repos)

  1. clang-tools-pip: Consider migrating from Sphinx to MkDocs for theme consistency
  2. All sub-project READMEs: Standardize header format and add "← Back to hub" link
  3. clang-tools-pip: Rename new_favicon.icofavicon.ico for consistency
  4. cpp-linter-action extra.css: Remove ~100 lines of dead social/badge/pulse CSS also not used there

- Change primary palette from 'indigo' to 'blue' to match cpp-linter-action
- Add missing MkDocs features: navigation.footer, content.code.copy,
  content.code.annotate, search.suggest, search.share, toc.follow,
  content.tabs.link
- Add missing markdown extensions: admonition, pymdownx.highlight,
  pymdownx.inlinehilite, pymdownx.snippets, toc (with permalink)
- Remove toc.integrate (incompatible with toc.follow)
- Fix broken links: cpp-linter CLI and cpp-linter-rs now point to
  real destinations (PyPI and GitHub) instead of non-existent
  cpp-linter.github.io sub-sites
- Add cpp-linter-rs to the quick-reference table
- Update pre-commit hooks version from v1.4.0 to v1.5.0
- Fix clang-tools-wheel link to point to GitHub Pages instead of GitHub
- Remove unused CSS: heart animation, badge styles, social layer styles,
  pulse animation, stats-grid (not used by hub site)
@netlify

netlify Bot commented Jun 8, 2026

Copy link
Copy Markdown

Deploy Preview for cpp-linter-github-io ready!

Name Link
🔨 Latest commit 3d3057a
🔍 Latest deploy log https://app.netlify.com/projects/cpp-linter-github-io/deploys/6a26f3149095130008ca1a03
😎 Deploy Preview https://deploy-preview-27--cpp-linter-github-io.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.

Indigo better matches the cpp-linter organization's logo and branding.
Also unifies the auto-mode palette which was previously blue (inconsistent
with light/dark modes that used indigo).
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