diff --git a/scripts/generate-readme b/scripts/generate-readme index b99d5b7d0a..02915ad82b 100755 --- a/scripts/generate-readme +++ b/scripts/generate-readme @@ -172,6 +172,11 @@ try { } }; + const packageBanner = (name) => + `![${name}](https://media.thi.ng/umbrella/banners/thing-${shortName( + name + )}.svg?${(Date.now() / 1000) | 0})`; + const blogPosts = (posts) => { if (!posts) return; return [ @@ -238,6 +243,7 @@ try { "pkg.description": () => packageDesc(PKG), "pkg.deps": () => packageDeps(PKG), "pkg.size": () => packageSize(), + "pkg.banner": () => packageBanner(PKG.name), status: () => packageStatus(META.status), examples: () => examples(PKG.name), supportPackages: () => supportPackages(PKG.name), diff --git a/scripts/make-module b/scripts/make-module index 5c1006848a..dfed509a73 100755 --- a/scripts/make-module +++ b/scripts/make-module @@ -193,7 +193,7 @@ EOF echo "writing README.tpl.md..." cat << 'EOF' > "$MODULE"/README.tpl.md -# ${pkg.name} +# ${pkg.banner} [![npm version](https://img.shields.io/npm/v/${pkg.name}.svg)](https://www.npmjs.com/package/${pkg.name}) ![npm downloads](https://img.shields.io/npm/dm/${pkg.name}.svg)