Add MakerWorld download count badges to README and Resources page - #39
Merged
Conversation
…loadCount The top-level downloadCount (524) includes instance/print-profile downloads and other aggregated sources. MWCount.myDesignDownloadCount (193) is the clean metric: downloads of Drew's own designs only.
DrewFerg11
approved these changes
Aug 8, 2026
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.
What
Adds live MakerWorld download counts in two places:
README badge — A shields.io dynamic badge showing total MakerWorld downloads across all your models, alongside the existing release/CI/stars/issues/Discord badges.
Resources page badges — Pill-style badges (Downloads / Makes / Likes) below each MakerWorld link in the 3D Printed Designs & Mods table on the docs site.
Files changed
README.md— Added aMakerWorld Downloadsbadge using shields.io's dynamic JSON badge. It fetches the totaldownloadCountfrom your MakerWorld user profile API (/api/v1/user-service/user/profile/2542847618) server-side (no CORS proxy needed for shields.io) and links tohttps://makerworld.com/@DMFerg.docs/javascripts/makerworld-badges.js— Self-contained script that auto-discovers MakerWorld links, extracts model IDs, fetches live stats viaproxy.cors.sh(CORS proxy), and injects pill-style badges. Works with MkDocs Material SPA navigation.docs/stylesheets/mw-badges.css— Badge styles with loading/error states. Uses Material CSS variables for light/dark theme support.mkdocs.yml— Registers the new JS and CSS viaextra_javascriptandextra_css.How the README badge works
shields.io has a dynamic JSON badge that fetches a JSON URL server-side and extracts a value via JSONPath. The MakerWorld user profile API returns a total
downloadCountacross all your models:No CORS proxy needed here because shields.io fetches from its own servers, not from the browser. The badge auto-updates with a cache period of ~30s to 5min (shields.io handles caching).
How the Resources page badges work
Same MakerWorld API, different delivery: the docs site needs client-side JS, so requests go through
proxy.cors.sh(the MW API doesn't send CORS headers). If the proxy ever goes down, swapping to another proxy is a one-line change to theCORS_PROXYconstant.Verified
No changes to
resources.mdwere needed — the script auto-discovers MakerWorld links.