Skip to content

Commit c597779

Browse files
author
Issayah
authored
Merge pull request bootstrap-vue#6623 from Hiws/specify-specific-cdn-versions
chore(docs): use specific bootstrap and vue versions for cdn links
2 parents 85a9e65 + 3f6f840 commit c597779

File tree

5 files changed

+37
-14
lines changed

5 files changed

+37
-14
lines changed

docs/components/main-docs.js

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import QuickLinks from '~/components/quick-links'
44
import Reload from '~/components/reload'
55
import Section from '~/components/section'
66
import { mergeData } from 'vue-functional-data-merge'
7+
import { bootstrapVersion, vueVersion } from '~/content'
78

89
// @vue/component
910
export default {
@@ -62,11 +63,25 @@ export default {
6263
const $quickLinks = h(QuickLinks)
6364

6465
// Body section
65-
const $bodySection = h(Section, {
66-
props: { play: true },
67-
domProps: { innerHTML: body || '' }
66+
const $bodySectionContent = h({
67+
delimiters: ['[[', ']]'], // change the delimiters to avoid conflicts with code examples
68+
data() {
69+
return {
70+
bootstrapVersion,
71+
vueVersion
72+
}
73+
},
74+
template: `<div>${body}</div>`
6875
})
6976

77+
const $bodySection = h(
78+
Section,
79+
{
80+
props: { play: true }
81+
},
82+
[$bodySectionContent]
83+
)
84+
7085
return h(Main, mergeData(data, { props: { tag } }), [
7186
$leadSection,
7287
$error,

docs/markdown/intro/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,14 +712,14 @@ JavaScript files.
712712
<!-- Add this to <head> -->
713713

714714
<!-- Load required Bootstrap and BootstrapVue CSS -->
715-
<link type="text/css" rel="stylesheet" href="https://unpkg.com/bootstrap/dist/css/bootstrap.min.css" />
715+
<link type="text/css" rel="stylesheet" href="https://unpkg.com/bootstrap@{{ bootstrapVersion }}/dist/css/bootstrap.min.css" />
716716
<link type="text/css" rel="stylesheet" href="https://unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.min.css" />
717717

718718
<!-- Load polyfills to support older browsers -->
719719
<script src="https://polyfill.io/v3/polyfill.min.js?features=es2015%2CIntersectionObserver" crossorigin="anonymous"></script>
720720

721721
<!-- Load Vue followed by BootstrapVue -->
722-
<script src="https://unpkg.com/vue@latest/dist/vue.min.js"></script>
722+
<script src="https://unpkg.com/vue@{{ vueVersion }}/dist/vue.min.js"></script>
723723
<script src="https://unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.min.js"></script>
724724

725725
<!-- Load the following for BootstrapVueIcons support -->

docs/markdown/reference/starter-templates/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ tags to load the required JavaScript and CSS in your page.
2626
<link
2727
type="text/css"
2828
rel="stylesheet"
29-
href="https://unpkg.com/bootstrap/dist/css/bootstrap.min.css"
29+
href="https://unpkg.com/bootstrap@[[ bootstrapVersion ]]/dist/css/bootstrap.min.css"
3030
/>
3131
<link
3232
type="text/css"
@@ -38,7 +38,7 @@ tags to load the required JavaScript and CSS in your page.
3838
<script src="https://polyfill.io/v3/polyfill.min.js?features=es2015%2CIntersectionObserver"></script>
3939

4040
<!-- Required scripts -->
41-
<script src="https://unpkg.com/vue@latest/dist/vue.js"></script>
41+
<script src="https://unpkg.com/vue@[[ vueVersion ]]/dist/vue.js"></script>
4242
<script src="https://unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.js"></script>
4343
</head>
4444
<body>

docs/pages/docs/icons/index.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ import Main from '~/components/main'
77
import QuickLinks from '~/components/quick-links'
88
import Section from '~/components/section'
99
import docsMixin from '~/plugins/docs-mixin'
10-
import { icons as iconsMeta, bootstrapIconsVersion, bootstrapIconsCount } from '~/content'
10+
import {
11+
icons as iconsMeta,
12+
bootstrapIconsVersion,
13+
bootstrapIconsCount,
14+
bootstrapVersion,
15+
vueVersion
16+
} from '~/content'
1117
import readmeData from '~/../src/icons/README.md'
1218

1319
const { titleLead = '', body = '', baseTOC = {} } = readmeData
@@ -35,7 +41,9 @@ export default {
3541
// Key for icons meta is `''` (empty slug)
3642
meta: iconsMeta[''],
3743
bootstrapIconsVersion,
38-
bootstrapIconsCount
44+
bootstrapIconsCount,
45+
bootstrapVersion,
46+
vueVersion
3947
}
4048
},
4149
computed: {

src/icons/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ icons library:
130130

131131
```html
132132
<head>
133-
<link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap/dist/css/bootstrap.min.css" />
133+
<link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap@{{ bootstrapVersion }}/dist/css/bootstrap.min.css" />
134134
<link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.min.css" />
135135
<!-- Load Vue followed by BootstrapVue, and BootstrapVueIcons -->
136-
<script src="//unpkg.com/vue@latest/dist/vue.min.js"></script>
136+
<script src="//unpkg.com/vue@{{ vueVersion }}/dist/vue.min.js"></script>
137137
<script src="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.min.js"></script>
138138
<script src="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue-icons.min.js"></script>
139139
</head>
@@ -143,10 +143,10 @@ If using just the icons:
143143

144144
```html
145145
<head>
146-
<link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap/dist/css/bootstrap.min.css" />
146+
<link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap@{{ bootstrapVersion }}/dist/css/bootstrap.min.css" />
147147
<link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue-icons.min.css" />
148148
<!-- Load Vue followed by BootstrapVueIcons -->
149-
<script src="//unpkg.com/vue@latest/dist/vue.min.js"></script>
149+
<script src="//unpkg.com/vue@{{ vueVersion }}/dist/vue.min.js"></script>
150150
<script src="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue-icons.min.js"></script>
151151
</head>
152152
```
@@ -514,7 +514,7 @@ class to the icon component, or create a new animation class in the form of
514514
`prefers-reduced-motion` media query. See the
515515
[reduced motion section of our accessibility documentation](/docs/reference/accessibility#reduced-motion)
516516
for additional details.
517-
- The `cylon` animation gets its name from the "eye" of the Cylons from the _original_
517+
- The `cylon` animation gets its name from the "eye" of the Cylons from the *original*
518518
[1978 Battlestar Galactica TV series](https://www.youtube.com/watch?v=5a5bEIf0UaU).
519519

520520
## Stacking icons

0 commit comments

Comments
 (0)