docs: hide the stale version chip in the repository header - #1139
Conversation
The repo card in the site header showed "e76674a" as the version. That is real
but meaningless: mkdocs-material fills the card from the GitHub API and renders
releases/latest as a version, and our latest release is a leftover of the
retired PDF pipeline.
That pipeline created a GitHub Release per push, tagged with the short commit
SHA (ncipollo/release-action with `tag: ${{ steps.vars.outputs.sha_short }}`),
which is why all 242 tags are 7-character hashes and the newest release is
named "2024-10-12-e76674a". The deploy job carrying it was commented out in
ab2258a and ca3df18 (2024-11-20, "remove PDF flow"), so releases stopped
there. Since then the header has advertised a hash from October 2024 on a site
that is redeployed on every push to main.
Hide the version fact and keep stars and forks, which are accurate (234/209,
matching the API). The docs are continuously deployed and carry no version, so
there is nothing meaningful to put in its place.
Done in CSS rather than by overriding the source.html partial: material injects
the facts client-side, building `md-source__fact--<type>` in JS, so dropping
them in the template would remove stars and forks too. The facts are a flex row
with `gap` and per-item icons, no textual separators, so hiding one leaves no
gap or stray glyph.
Verified with a local `mkdocs build`: the rule ships in site/css/armbian-extra.css
and the stylesheet is linked from the built pages.
Signed-off-by: Igor Pecovnik <igor@armbian.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. WalkthroughThe documentation stylesheet adds a Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This localized CSS change hides the stale repository version chip while preserving stars and forks; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What the card shows vs. reality
mkdocs-material fills the header repo card from the GitHub API. Two of the three facts are accurate:
stargazers_count: 234forks_count: 209e76674areleases/latest → tag_name: e76674a, published 2024-10-12The card is reporting faithfully — the data behind it is the fossil.
Where
e76674acame fromIt was never a version. The old PDF pipeline in
release.yamlpublished a GitHub Release per push, tagged with the short commit SHA:That is why all 242 tags are 7-character hashes and the newest release is literally named
2024-10-12-e76674a. The job carrying it was commented out on 2024-11-20 in ab2258a ("Update workflows to remove PDF flow") and ca3df18 ("Disable the rest of the script as its not needed"), so releases stopped there. Today'srelease.yamlonly builds the site and rsyncs it — it creates no tag or release at all.The change
The docs are continuously deployed and carry no version, so there is nothing meaningful to put in the chip's place.
Why CSS and not a template override: material injects these facts client-side, building the class as
md-source__fact--${t}in JS. Overridingpartials/source.htmlwould mean droppingdata-md-component="source", which removes stars and forks too.Why no visual gap:
.md-source__factsis a flex row usinggap, each item carrying its own::beforeicon — there are no textual separators — so hiding one item leaves no stray glyph or spacing.Verification
Local
mkdocs build(mkdocs-material 9.7.6): the rule ships insite/css/armbian-extra.cssand the stylesheet is linked from the built pages.site/is gitignored, so only the source CSS is committed.Alternatives not taken
Documentation website preview will be available shortly:
Open WWW preview