Skip to content

Commit d533630

Browse files
authored
chore(docs): add meta description for docs pages (#2957)
1 parent a87dab2 commit d533630

File tree

56 files changed

+135
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+135
-11
lines changed

docs/content/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { importAll, parseVersion } from '~/utils'
2-
import { version, dependencies, devDependencies } from '~/../package.json'
2+
import { version, dependencies, devDependencies, description } from '~/../package.json'
33
import { getDefaults } from '~/../src/utils/config'
44

55
const componentsContext = require.context('~/../src/components/', true, /package.json/)
@@ -46,5 +46,6 @@ export const bootstrapVersion = parseVersion(dependencies.bootstrap)
4646
export const vueVersion = parseVersion(devDependencies.vue)
4747
export const nuxtVersion = parseVersion(devDependencies.nuxt)
4848
export const defaultConfig = getDefaults()
49+
export const bvDescription = description
4950

5051
export { version }
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"title": "Changelog"
2+
"title": "Changelog",
3+
"description": "All notable changes to BootstrapVue are documented in this page."
34
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"title": "Contributing"
2+
"title": "Contributing",
3+
"description": "Information on contributing to the BootstrapVue project."
34
}

docs/markdown/misc/settings/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"title": "Settings",
3+
"description": "Configuring BootstrapVue",
34
"new": true
45
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"title": "Color Variants"
2+
"title": "Color Variants",
3+
"description": "Color variants available when using the default Bootstrap V4 CSS and their mappings to CSS classes."
34
}

docs/markdown/reference/images/README.md

Lines changed: 5 additions & 3 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"title": "Component img src resolving",
3+
"description": "Using project relative image URLs for BootstrapVue custom components with vue-loader",
34
"slug": "images"
45
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"title": "Router support",
3+
"description": "Several BootstrapVue components support rendering <router-link> components compatible with Vue-Router and Nuxt.",
34
"slug": "router-links"
45
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"title": "Size props and classes",
3+
"description": "Bootstrap V4 CSS provides several classes that control the sizing of elements, of which some of these have been translated into props on components.",
34
"slug": "size-props"
45
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"title": "Spacing classes"
2+
"title": "Spacing classes",
3+
"descripton": "Bootstrap V4 CSS includes a wide range of shorthand responsive margin and padding utility classes to modify an element's appearance."
34
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"title": "Starter Templates"
2+
"title": "Starter Templates",
3+
"description": "There are several ways you can create your app, from basic client side HTML all the way up to using a build system and compilers."
34
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"title": "Theming Bootstrap",
3+
"description": "Theming is accomplished by Sass variables, Sass maps, and custom CSS. There’s no dedicated theme stylesheet; instead, you can enable the built-in theme to add gradients, shadows, and more.",
34
"slug": "theming"
45
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"title": "Utility Classes",
3+
"description": "Bootstrap V4 CSS provides various utility classes to control color, spacing, flex-box, text alignment, floating, position, responsive display/hiding and much more.",
34
"slug": "utility-classes"
45
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"title": "Form Validation",
3+
"description": "BootstrapVue does not include form validation by default; we leave that up to the many existing form validation plugins. Included here are some examples of validation plugins and how they may be integrated.",
34
"slug": "validation"
45
}

docs/pages/play.vue

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,25 @@ export default {
231231
}
232232
},
233233
head() {
234+
const title = 'Online Playground | BootstrapVue'
235+
const description = 'Interactively play and test BootstrapVue components online.'
234236
return {
235-
title: 'Playground - BootstrapVue'
237+
title: title,
238+
meta: [
239+
{
240+
hid: 'og:title',
241+
name: 'og:title',
242+
property: 'og:title',
243+
content: title
244+
},
245+
{
246+
hid: 'og:description',
247+
name: 'og:description',
248+
property: 'og:description',
249+
content: description
250+
},
251+
{ hid: 'description', name: 'description', content: description }
252+
]
236253
}
237254
},
238255
computed: {

docs/plugins/docs-mixin.js

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* docs-mixin: used by any page under /docs path
33
*/
44
import { scrollTo, offsetTop } from '~/utils'
5+
import { bvDescription } from '~/content'
56

67
// @vue/component
78
export default {
@@ -13,13 +14,64 @@ export default {
1314

1415
computed: {
1516
content() {
17+
// NOTE: is this computed prop used anymore?
1618
return (this.$route.params.slug && this._content[this.$route.params.slug]) || {}
19+
},
20+
headTitle() {
21+
const routeName = this.$route.name
22+
let title = ''
23+
let section = ''
24+
if (this.meta && this.meta.title) {
25+
title = this.meta.title
26+
}
27+
if (routeName === 'docs-components-slug') {
28+
section = 'Components'
29+
} else if (routeName === 'docs-directives-slug') {
30+
section = 'Directives'
31+
} else if (routeName === 'docs-reference-slug') {
32+
section = 'Reference'
33+
} else if (routeName === 'docs-misc-slug') {
34+
section = 'Misc'
35+
}
36+
return [title, section, 'BootstrapVue'].filter(Boolean).join(' | ')
37+
},
38+
headMeta() {
39+
const meta = [
40+
{
41+
hid: 'og:title',
42+
name: 'og:title',
43+
property: 'og:title',
44+
content: this.headTitle
45+
}
46+
]
47+
if (this.meta && this.meta.description) {
48+
const desc = this.meta.description
49+
meta.push({
50+
hid: 'description',
51+
name: 'description',
52+
content: desc
53+
})
54+
meta.push({
55+
hid: 'og:description',
56+
name: 'og:description',
57+
property: 'og:description',
58+
content: desc
59+
})
60+
} else if (bvDescription) {
61+
meta.push({
62+
hid: 'description',
63+
name: 'description',
64+
content: bvDescription
65+
})
66+
}
67+
return meta
1768
}
1869
},
1970

2071
head() {
2172
return {
22-
title: `${(this.meta && this.meta.title) || 'Docs'} - BootstrapVue`
73+
title: this.headTitle,
74+
meta: this.headMeta
2375
}
2476
},
2577

src/components/alert/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Alert",
6+
"description": "Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.",
67
"components": [
78
{
89
"component": "BAlert",

src/components/badge/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Badge",
6+
"description": "Small and adaptive tag for adding context to just about any content.",
67
"components": [
78
"BBadge"
89
]

src/components/breadcrumb/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Breadcrumb",
6+
"description": "Indicate the current page’s location within a navigational hierarchy. Separators are automatically added in CSS through ::before and content.",
67
"components": [
78
"BBreadcrumb",
89
{

src/components/button-group/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Button Group",
6+
"description": "Group a series of buttons together on a single line with <b-button-group>.",
67
"components": [
78
{
89
"component": "BButtonGroup",

src/components/button-toolbar/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Button Toolbar",
6+
"description": "Group a series of <b-button-group> and/or <b-input-group> together on a single line, with optional keyboard navigation.",
67
"components": [
78
{
89
"component": "BButtonToolbar",

src/components/button/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Button",
6+
"description": "Use Bootstrap Vue’s <b-button> component for actions in forms, dialogs, and more. Includes support for a handful of contextual variations, sizes, states, and more.",
67
"components": [
78
{
89
"component": "BButton",

src/components/card/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Card",
6+
"description": "A card is a flexible and extensible content container. It includes options for headers and footers, a wide variety of content, contextual background colors, and powerful display options.",
67
"components": [
78
{
89
"component": "BCard",

src/components/carousel/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Carousel",
6+
"description": "The <b-carousel> component is a slideshow for cycling through a series of content, built with CSS 3D transforms. It works with a series of images, text, or custom markup.",
67
"components": [
78
{
89
"component": "BCarousel",

src/components/collapse/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Collapse",
6+
"description": "Easily toggle content visibility on your pages. Includes support for making accordions.",
67
"components": [
78
{
89
"component": "BCollapse",

src/components/dropdown/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Dropdown",
6+
"description": "Dropdowns are toggleable, contextual overlays for displaying lists of links and actions in a dropdown menu format.",
67
"components": [
78
{
89
"component": "BDropdown",

src/components/embed/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Embed",
6+
"description": "Create responsive video or slideshow embeds based on the width of the parent by creating an intrinsic ratio that scales on any device.",
67
"components": [
78
"BEmbed"
89
]

src/components/form-checkbox/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Form Checkbox",
6+
"description": "Custom checkbox input and checkbox group to replace the browser default checkbox input, built on top of semantic and accessible markup. Optionally supports switch styling.",
67
"components": [
78
{
89
"component": "BFormCheckboxGroup",

src/components/form-file/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Form File",
6+
"description": "Customized, cross-browser consistent, file input control that supports single file, multiple files, and directory upload.",
67
"components": [
78
{
89
"component": "BFormFile",

src/components/form-group/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Form Group",
6+
"description": "Easily add some structure to forms. Its purpose is to pair form controls with a legend or label, and to provide help text and invalid/valid feedback text, as well as visual (color) contextual state feedback.",
67
"components": [
78
{
89
"component": "BFormGroup",

src/components/form-input/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.1.0",
44
"meta": {
55
"title": "Form Input",
6+
"description": "Create various type inputs such as: text, password, number, url, email, search, range, date and more.",
67
"components": [
78
{
89
"component": "BFormInput",

src/components/form-radio/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Form Radio",
6+
"description": "Cross browser consistent radio inputs and ragio groups, using Bootstrap's custom radio input to replace the browser default radio input.",
67
"components": [
78
{
89
"component": "BFormRadioGroup",

src/components/form-select/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Form Select",
6+
"description": "Custom <select> component using cross-browser custom styles. Optionally generate <option> entries based on an array, array of objects.",
67
"components": [
78
{
89
"component": "BFormSelect",

src/components/form-textarea/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Form Textarea",
6+
"description": "Create multi-line text inputs with support for auto height sizing, minimum and maximum number of rows, and contextual validation states.",
67
"components": [
78
{
89
"component": "BFormTextarea",

src/components/form/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Form",
6+
"description": "Form component and form helper components that optionally supports inline form styles and validation states",
67
"slug": "form",
78
"components": [
89
{

src/components/image/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Image",
6+
"description": "Create responsive images, optionally adding lightweight styles to them — all via props. Support for rounded images, thumbnail styling, alignment, and even the ability to create blank images with an optional solid background color, and lazy loaded images.",
67
"components": [
78
"BImg",
89
"BImgLazy"

src/components/input-group/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Input Group",
6+
"description": "Easily extend form controls by adding text, buttons, or button groups on either side of textual inputs.",
67
"components": [
78
{
89
"component": "BInputGroup",

src/components/jumbotron/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Jumbotron",
6+
"description": "A lightweight, flexible component that can optionally extend the entire viewport to showcase key marketing messages on your site.",
67
"components": [
78
{
89
"component": "BJumbotron",

src/components/layout/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Layout and Grid System",
6+
"description": "Use the powerful mobile-first flexbox grid (via the <b-container>, <b-row>, <b-form-row> and <b-col> components) to build layouts of all shapes and sizes thanks to a twelve column system, five default responsive tiers, CSS Sass variables and mixins, and dozens of predefined classes.",
67
"slug": "layout",
78
"components": [
89
"BContainer",

src/components/link/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "Link",
6+
"desscription": "Use BootstrapVue's custom <b-link> component for generating a standard <a> link or <router-link>. <b-link> supports the disabled state and click event propagation.",
67
"components": [
78
{
89
"component": "BLink",

src/components/list-group/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"meta": {
55
"title": "List group",
6+
"description": "List groups are a flexible and powerful component for displaying a series of content. List group items can be modified to support just about any content within. They can also be used as navigation via various props.",
67
"components": [
78
"BListGroup",
89
"BListGroupItem"

0 commit comments

Comments
 (0)