diff options
author | XhmikosR <xhmikosr@gmail.com> | 2022-05-13 19:55:29 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2022-05-13 20:16:05 +0300 |
commit | ab37f63b3d7968d039b7961bca3fb29fe132a40e (patch) | |
tree | ab73785ecfa9f2114bf139a138576169f01131e3 /site | |
parent | fca04c07131a81e625a516cf7b98a8c7df0df1c1 (diff) |
docs: add the version in npm/yarn commands
Diffstat (limited to 'site')
-rw-r--r-- | site/content/docs/5.2/getting-started/download.md | 4 | ||||
-rw-r--r-- | site/layouts/partials/home/masthead-followup.html | 2 | ||||
-rw-r--r-- | site/layouts/partials/home/masthead.html | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/site/content/docs/5.2/getting-started/download.md b/site/content/docs/5.2/getting-started/download.md index 8a4c8f215d..eeffdc83e5 100644 --- a/site/content/docs/5.2/getting-started/download.md +++ b/site/content/docs/5.2/getting-started/download.md @@ -59,7 +59,7 @@ Pull in Bootstrap's **source files** into nearly any project with some of the mo Install Bootstrap in your Node.js powered apps with [the npm package](https://www.npmjs.com/package/bootstrap): ```sh -npm install bootstrap +npm install bootstrap@{{< param "current_version" >}} ``` `const bootstrap = require('bootstrap')` or `import bootstrap from 'bootstrap'` will load all of Bootstrap's plugins onto a `bootstrap` object. @@ -79,7 +79,7 @@ Bootstrap's `package.json` contains some additional metadata under the following Install Bootstrap in your Node.js powered apps with [the yarn package](https://yarnpkg.com/en/package/bootstrap): ```sh -yarn add bootstrap +yarn add bootstrap@{{< param "current_version" >}} ``` ### RubyGems diff --git a/site/layouts/partials/home/masthead-followup.html b/site/layouts/partials/home/masthead-followup.html index a57e0f7330..8d4e9796f0 100644 --- a/site/layouts/partials/home/masthead-followup.html +++ b/site/layouts/partials/home/masthead-followup.html @@ -22,7 +22,7 @@ <p class="pe-lg-5"> Install Bootstrap’s source Sass and JavaScript files via npm, RubyGems, Composer, or Meteor. Package managed installs don’t include documentation or our full build scripts. You can also <a href="https://github.com/twbs/bootstrap-npm-starter">use our npm template repo</a> to quickly generate a Bootstrap project via npm. </p> - {{ highlight "npm install bootstrap" "sh" "" }} + {{ highlight (printf ("npm install bootstrap@%s") .Site.Params.current_version) "sh" "" }} {{ highlight (printf ("gem install bootstrap -v %s") .Site.Params.current_ruby_version) "sh" "" }} <p> <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/download/">Read our installation docs</a> for more info and additional package managers. diff --git a/site/layouts/partials/home/masthead.html b/site/layouts/partials/home/masthead.html index 9e578a3011..4f91c2b07e 100644 --- a/site/layouts/partials/home/masthead.html +++ b/site/layouts/partials/home/masthead.html @@ -12,7 +12,7 @@ </p> <div class="d-flex flex-column flex-md-row align-items-md-stretch justify-content-md-center gap-3 mb-4"> <div class="d-inline-block v-align-middle fs-5" style="min-width: fit-content;"> - {{ highlight "npm i bootstrap" "sh" "" }} + {{ highlight (printf ("npm install bootstrap@%s") .Site.Params.current_version) "sh" "" }} </div> <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/" class="btn btn-lg bd-btn-lg btn-bd-primary d-flex align-items-center justify-content-center fw-semibold" onclick="ga('send', 'event', 'Jumbotron actions', 'Get started', 'Get started');"> <svg class="bi me-2" aria-hidden="true"><use xlink:href="#book-half"></use></svg> |