File tree Expand file tree Collapse file tree 6 files changed +48
-10
lines changed
Expand file tree Collapse file tree 6 files changed +48
-10
lines changed Original file line number Diff line number Diff line change 175175 </style >
176176
177177<script >
178+ import { BASE_URL , BASE_URL_DEV , NETLIFY_URL } from ' ~/constants'
178179import { version } from ' ~/content'
179180
180181export default {
@@ -187,13 +188,13 @@ export default {
187188 },
188189 computed: {
189190 prodURL () {
190- return ' https://bootstrap-vue.org/ '
191+ return BASE_URL
191192 },
192193 devURL () {
193194 if (this .isNetlify ) {
194- return ' https://bootstrap-vue.netlify.app/ '
195+ return NETLIFY_URL
195196 }
196- return ' https://dev.bootstrap-vue.org/ '
197+ return BASE_URL_DEV
197198 },
198199 isNetlify () {
199200 return Boolean (process .env .NETLIFY )
Original file line number Diff line number Diff line change 1+ export const BASE_URL = 'https://bootstrap-vue.org'
2+ export const BASE_URL_DEV = 'https://dev.bootstrap-vue.org'
3+ export const NETLIFY_URL = 'https://bootstrap-vue.netlify.app'
4+
5+ export const GA_TRACKING_ID = 'UA-89526435-1'
6+
7+ export const TWITTER_HANDLE = '@BootstrapVue'
Original file line number Diff line number Diff line change 1+ import { BASE_URL } from '~/constants'
12import Footer from '~/components/footer'
23import Header from '~/components/header'
34
45export default {
56 name : 'BVDefaultLayout' ,
6- functional : true ,
7- render : h => [ h ( Header ) , h ( 'nuxt' ) , h ( Footer ) ]
7+ render ( h ) {
8+ return h ( 'div' , [ h ( Header ) , h ( 'nuxt' ) , h ( Footer ) ] )
9+ } ,
10+ head ( ) {
11+ // Add canonical URL so all site variations are
12+ // indexed to the same primary URL
13+ return {
14+ link : [
15+ {
16+ hid : 'canonical' ,
17+ rel : 'canonical' ,
18+ href : `${ BASE_URL } ${ this . $route . path } `
19+ }
20+ ]
21+ }
22+ }
823}
Original file line number Diff line number Diff line change 1+ import { BASE_URL } from '~/constants'
12import BVBreadcrumbs from '~/components/breadcrumbs'
23import BVFeedback from '~/components/feedback'
34import BVFooter from '~/components/footer'
@@ -73,5 +74,18 @@ export default {
7374 const $footer = h ( BVFooter , { props : { isDocs : true } } )
7475
7576 return h ( 'div' , [ $header , $container , $footer ] )
77+ } ,
78+ head ( ) {
79+ // Add canonical URL so all site variations are
80+ // indexed to the same primary URL
81+ return {
82+ link : [
83+ {
84+ hid : 'canonical' ,
85+ rel : 'canonical' ,
86+ href : `${ BASE_URL } ${ this . $route . path } `
87+ }
88+ ]
89+ }
7690 }
7791}
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ const fs = require('fs')
22const path = require ( 'path' )
33const marked = require ( 'marked' )
44const hljs = require ( 'highlight.js/lib/highlight.js' )
5+ const { BASE_URL , GA_TRACKING_ID , TWITTER_HANDLE } = require ( './constants' )
56
67// Import only the languages we need from "highlight.js"
78hljs . registerLanguage ( 'javascript' , require ( 'highlight.js/lib/languages/javascript' ) )
@@ -247,11 +248,11 @@ module.exports = {
247248 } ,
248249 meta : {
249250 // `ogHost` is required for `og:image` to be populated
250- ogHost : 'https://bootstrap-vue.org' ,
251+ ogHost : BASE_URL ,
251252 ogImage : true ,
252253 twitterCard : 'summary' ,
253- twitterSite : '@BootstrapVue' ,
254- twitterCreator : '@BootstrapVue'
254+ twitterSite : TWITTER_HANDLE ,
255+ twitterCreator : TWITTER_HANDLE
255256 }
256257 } ,
257258
@@ -271,7 +272,7 @@ module.exports = {
271272 modules : [ '@nuxtjs/pwa' ] ,
272273
273274 'google-analytics' : {
274- id : 'UA-89526435-1' ,
275+ id : GA_TRACKING_ID ,
275276 autoTracking : {
276277 exception : true
277278 }
Original file line number Diff line number Diff line change 7575 documentaton for licensing information.
7676 </li >
7777 <li >
78- BootstrapVue does not guaantee that all coustom components provided by a theme are
78+ BootstrapVue does not guarantee that all coustom components provided by a theme are
7979 WIA-ARIA compliant. Refer to the provider documentation for details.
8080 </li >
8181 <li >
You can’t perform that action at this time.
0 commit comments