Skip to content

chore(docs): add meta description for docs pages #2957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 71 commits into from
Mar 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
2169b43
Update index.js
tmorehouse Mar 30, 2019
bd217e2
Update docs-mixin.js
tmorehouse Mar 30, 2019
3ec4a3d
Update docs-mixin.js
tmorehouse Mar 30, 2019
28c0eee
Update package.json
tmorehouse Mar 30, 2019
590528b
Update package.json
tmorehouse Mar 30, 2019
6a767c6
Update package.json
tmorehouse Mar 30, 2019
8dcc73c
Update package.json
tmorehouse Mar 30, 2019
4d8224d
Update package.json
tmorehouse Mar 30, 2019
2e22cfe
Update package.json
tmorehouse Mar 30, 2019
fe82c7a
Update docs-mixin.js
tmorehouse Mar 30, 2019
66edc3b
Update docs-mixin.js
tmorehouse Mar 30, 2019
6464d4c
Update docs-mixin.js
tmorehouse Mar 30, 2019
4722dde
Update docs-mixin.js
tmorehouse Mar 30, 2019
741b945
Update package.json
tmorehouse Mar 30, 2019
53852b1
Update package.json
tmorehouse Mar 30, 2019
556a661
Update package.json
tmorehouse Mar 30, 2019
98670ea
Update docs-mixin.js
tmorehouse Mar 31, 2019
5d3e84f
Update package.json
tmorehouse Mar 31, 2019
fa1346e
Update package.json
tmorehouse Mar 31, 2019
c34f041
Update package.json
tmorehouse Mar 31, 2019
69b768f
Update package.json
tmorehouse Mar 31, 2019
fd5f324
Update package.json
tmorehouse Mar 31, 2019
8505d13
Update package.json
tmorehouse Mar 31, 2019
68a8788
Update package.json
tmorehouse Mar 31, 2019
408bc52
Update package.json
tmorehouse Mar 31, 2019
9568436
Update package.json
tmorehouse Mar 31, 2019
20cd0b7
Update package.json
tmorehouse Mar 31, 2019
fefc509
Update package.json
tmorehouse Mar 31, 2019
a8a235d
Update package.json
tmorehouse Mar 31, 2019
90d5066
Update package.json
tmorehouse Mar 31, 2019
9dce3ae
Update package.json
tmorehouse Mar 31, 2019
488fae7
Update package.json
tmorehouse Mar 31, 2019
48ec7c2
Update package.json
tmorehouse Mar 31, 2019
a415433
Update package.json
tmorehouse Mar 31, 2019
f11f2ef
Update package.json
tmorehouse Mar 31, 2019
3d3cf6c
Update package.json
tmorehouse Mar 31, 2019
f33d061
Update package.json
tmorehouse Mar 31, 2019
0b796de
Update package.json
tmorehouse Mar 31, 2019
0126984
Update package.json
tmorehouse Mar 31, 2019
8580b9c
Update package.json
tmorehouse Mar 31, 2019
436094b
Update package.json
tmorehouse Mar 31, 2019
a420eee
Update package.json
tmorehouse Mar 31, 2019
4aedd0d
Update package.json
tmorehouse Mar 31, 2019
4280d95
Update package.json
tmorehouse Mar 31, 2019
5448a14
Update package.json
tmorehouse Mar 31, 2019
42ba30b
Update package.json
tmorehouse Mar 31, 2019
bca28d5
Update package.json
tmorehouse Mar 31, 2019
1e65747
Update package.json
tmorehouse Mar 31, 2019
08fb9ed
Update meta.json
tmorehouse Mar 31, 2019
6c96782
Update meta.json
tmorehouse Mar 31, 2019
6a3c067
Update meta.json
tmorehouse Mar 31, 2019
18dae91
Update meta.json
tmorehouse Mar 31, 2019
4bad9cf
Update meta.json
tmorehouse Mar 31, 2019
a95994d
Update meta.json
tmorehouse Mar 31, 2019
8172eec
Update meta.json
tmorehouse Mar 31, 2019
2c727f3
Update meta.json
tmorehouse Mar 31, 2019
f00a526
Update README.md
tmorehouse Mar 31, 2019
d2db437
Update meta.json
tmorehouse Mar 31, 2019
3155137
Update meta.json
tmorehouse Mar 31, 2019
ed29d83
Update meta.json
tmorehouse Mar 31, 2019
f5a1749
Update meta.json
tmorehouse Mar 31, 2019
fd2b605
Merge branch 'dev' into tmorehouse/docs-meta
tmorehouse Mar 31, 2019
f9ff19f
Update play.vue
tmorehouse Mar 31, 2019
063cb4b
Update play.vue
tmorehouse Mar 31, 2019
02a96e0
Update play.vue
tmorehouse Mar 31, 2019
37239d5
Update README.md
tmorehouse Mar 31, 2019
9f572f3
Update docs-mixin.js
tmorehouse Mar 31, 2019
1e1d5eb
Update docs-mixin.js
tmorehouse Mar 31, 2019
d759510
Merge branch 'dev' into tmorehouse/docs-meta
tmorehouse Mar 31, 2019
1e05952
Merge branch 'dev' into tmorehouse/docs-meta
jacobmllr95 Mar 31, 2019
3964df2
Update docs-mixin.js
tmorehouse Mar 31, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/content/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { importAll, parseVersion } from '~/utils'
import { version, dependencies, devDependencies } from '~/../package.json'
import { version, dependencies, devDependencies, description } from '~/../package.json'
import { getDefaults } from '~/../src/utils/config'

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

export { version }
3 changes: 2 additions & 1 deletion docs/markdown/misc/changelog/meta.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"title": "Changelog"
"title": "Changelog",
"description": "All notable changes to BootstrapVue are documented in this page."
}
3 changes: 2 additions & 1 deletion docs/markdown/misc/contributing/meta.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"title": "Contributing"
"title": "Contributing",
"description": "Information on contributing to the BootstrapVue project."
}
1 change: 1 addition & 0 deletions docs/markdown/misc/settings/meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"title": "Settings",
"description": "Configuring BootstrapVue",
"new": true
}
3 changes: 2 additions & 1 deletion docs/markdown/reference/color-variants/meta.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"title": "Color Variants"
"title": "Color Variants",
"description": "Color variants available when using the default Bootstrap V4 CSS and their mappings to CSS classes."
}
8 changes: 5 additions & 3 deletions docs/markdown/reference/images/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Project relative image URLs for BootstrapVue custom components
# Component img src resolving

> vue-loader automatically converts project relative `src` attributes on `<img>` tags, but doesn't
> automatically for BootstrapVue custom components that accept image src url tags.
## Using project relative image URLs for BootstrapVue custom components

vue-loader automatically converts project relative `src` attributes on `<img>` tags, but doesn't
automatically for BootstrapVue custom components that accept image src url tags.

## Vue-loader `transformAssetUrls` to resolve img paths

Expand Down
1 change: 1 addition & 0 deletions docs/markdown/reference/images/meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"title": "Component img src resolving",
"description": "Using project relative image URLs for BootstrapVue custom components with vue-loader",
"slug": "images"
}
1 change: 1 addition & 0 deletions docs/markdown/reference/router-links/meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"title": "Router support",
"description": "Several BootstrapVue components support rendering <router-link> components compatible with Vue-Router and Nuxt.",
"slug": "router-links"
}
1 change: 1 addition & 0 deletions docs/markdown/reference/size-props/meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"title": "Size props and classes",
"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.",
"slug": "size-props"
}
3 changes: 2 additions & 1 deletion docs/markdown/reference/spacing-classes/meta.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"title": "Spacing classes"
"title": "Spacing classes",
"descripton": "Bootstrap V4 CSS includes a wide range of shorthand responsive margin and padding utility classes to modify an element's appearance."
}
3 changes: 2 additions & 1 deletion docs/markdown/reference/starter-templates/meta.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"title": "Starter Templates"
"title": "Starter Templates",
"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."
}
1 change: 1 addition & 0 deletions docs/markdown/reference/theming/meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"title": "Theming Bootstrap",
"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.",
"slug": "theming"
}
1 change: 1 addition & 0 deletions docs/markdown/reference/utility-classes/meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"title": "Utility Classes",
"description": "Bootstrap V4 CSS provides various utility classes to control color, spacing, flex-box, text alignment, floating, position, responsive display/hiding and much more.",
"slug": "utility-classes"
}
1 change: 1 addition & 0 deletions docs/markdown/reference/validation/meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"title": "Form Validation",
"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.",
"slug": "validation"
}
19 changes: 18 additions & 1 deletion docs/pages/play.vue
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,25 @@ export default {
}
},
head() {
const title = 'Online Playground | BootstrapVue'
const description = 'Interactively play and test BootstrapVue components online.'
return {
title: 'Playground - BootstrapVue'
title: title,
meta: [
{
hid: 'og:title',
name: 'og:title',
property: 'og:title',
content: title
},
{
hid: 'og:description',
name: 'og:description',
property: 'og:description',
content: description
},
{ hid: 'description', name: 'description', content: description }
]
}
},
computed: {
Expand Down
54 changes: 53 additions & 1 deletion docs/plugins/docs-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* docs-mixin: used by any page under /docs path
*/
import { scrollTo, offsetTop } from '~/utils'
import { bvDescription } from '~/content'

// @vue/component
export default {
Expand All @@ -13,13 +14,64 @@ export default {

computed: {
content() {
// NOTE: is this computed prop used anymore?
return (this.$route.params.slug && this._content[this.$route.params.slug]) || {}
},
headTitle() {
const routeName = this.$route.name
let title = ''
let section = ''
if (this.meta && this.meta.title) {
title = this.meta.title
}
if (routeName === 'docs-components-slug') {
section = 'Components'
} else if (routeName === 'docs-directives-slug') {
section = 'Directives'
} else if (routeName === 'docs-reference-slug') {
section = 'Reference'
} else if (routeName === 'docs-misc-slug') {
section = 'Misc'
}
return [title, section, 'BootstrapVue'].filter(Boolean).join(' | ')
},
headMeta() {
const meta = [
{
hid: 'og:title',
name: 'og:title',
property: 'og:title',
content: this.headTitle
}
]
if (this.meta && this.meta.description) {
const desc = this.meta.description
meta.push({
hid: 'description',
name: 'description',
content: desc
})
meta.push({
hid: 'og:description',
name: 'og:description',
property: 'og:description',
content: desc
})
} else if (bvDescription) {
meta.push({
hid: 'description',
name: 'description',
content: bvDescription
})
}
return meta
}
},

head() {
return {
title: `${(this.meta && this.meta.title) || 'Docs'} - BootstrapVue`
title: this.headTitle,
meta: this.headMeta
}
},

Expand Down
1 change: 1 addition & 0 deletions src/components/alert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Alert",
"description": "Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.",
"components": [
{
"component": "BAlert",
Expand Down
1 change: 1 addition & 0 deletions src/components/badge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Badge",
"description": "Small and adaptive tag for adding context to just about any content.",
"components": [
"BBadge"
]
Expand Down
1 change: 1 addition & 0 deletions src/components/breadcrumb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Breadcrumb",
"description": "Indicate the current page’s location within a navigational hierarchy. Separators are automatically added in CSS through ::before and content.",
"components": [
"BBreadcrumb",
{
Expand Down
1 change: 1 addition & 0 deletions src/components/button-group/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Button Group",
"description": "Group a series of buttons together on a single line with <b-button-group>.",
"components": [
{
"component": "BButtonGroup",
Expand Down
1 change: 1 addition & 0 deletions src/components/button-toolbar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Button Toolbar",
"description": "Group a series of <b-button-group> and/or <b-input-group> together on a single line, with optional keyboard navigation.",
"components": [
{
"component": "BButtonToolbar",
Expand Down
1 change: 1 addition & 0 deletions src/components/button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Button",
"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.",
"components": [
{
"component": "BButton",
Expand Down
1 change: 1 addition & 0 deletions src/components/card/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Card",
"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.",
"components": [
{
"component": "BCard",
Expand Down
1 change: 1 addition & 0 deletions src/components/carousel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Carousel",
"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.",
"components": [
{
"component": "BCarousel",
Expand Down
1 change: 1 addition & 0 deletions src/components/collapse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Collapse",
"description": "Easily toggle content visibility on your pages. Includes support for making accordions.",
"components": [
{
"component": "BCollapse",
Expand Down
1 change: 1 addition & 0 deletions src/components/dropdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Dropdown",
"description": "Dropdowns are toggleable, contextual overlays for displaying lists of links and actions in a dropdown menu format.",
"components": [
{
"component": "BDropdown",
Expand Down
1 change: 1 addition & 0 deletions src/components/embed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Embed",
"description": "Create responsive video or slideshow embeds based on the width of the parent by creating an intrinsic ratio that scales on any device.",
"components": [
"BEmbed"
]
Expand Down
1 change: 1 addition & 0 deletions src/components/form-checkbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Form Checkbox",
"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.",
"components": [
{
"component": "BFormCheckboxGroup",
Expand Down
1 change: 1 addition & 0 deletions src/components/form-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Form File",
"description": "Customized, cross-browser consistent, file input control that supports single file, multiple files, and directory upload.",
"components": [
{
"component": "BFormFile",
Expand Down
1 change: 1 addition & 0 deletions src/components/form-group/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Form Group",
"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.",
"components": [
{
"component": "BFormGroup",
Expand Down
1 change: 1 addition & 0 deletions src/components/form-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.1.0",
"meta": {
"title": "Form Input",
"description": "Create various type inputs such as: text, password, number, url, email, search, range, date and more.",
"components": [
{
"component": "BFormInput",
Expand Down
1 change: 1 addition & 0 deletions src/components/form-radio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Form Radio",
"description": "Cross browser consistent radio inputs and ragio groups, using Bootstrap's custom radio input to replace the browser default radio input.",
"components": [
{
"component": "BFormRadioGroup",
Expand Down
1 change: 1 addition & 0 deletions src/components/form-select/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Form Select",
"description": "Custom <select> component using cross-browser custom styles. Optionally generate <option> entries based on an array, array of objects.",
"components": [
{
"component": "BFormSelect",
Expand Down
1 change: 1 addition & 0 deletions src/components/form-textarea/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Form Textarea",
"description": "Create multi-line text inputs with support for auto height sizing, minimum and maximum number of rows, and contextual validation states.",
"components": [
{
"component": "BFormTextarea",
Expand Down
1 change: 1 addition & 0 deletions src/components/form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Form",
"description": "Form component and form helper components that optionally supports inline form styles and validation states",
"slug": "form",
"components": [
{
Expand Down
1 change: 1 addition & 0 deletions src/components/image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Image",
"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.",
"components": [
"BImg",
"BImgLazy"
Expand Down
1 change: 1 addition & 0 deletions src/components/input-group/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Input Group",
"description": "Easily extend form controls by adding text, buttons, or button groups on either side of textual inputs.",
"components": [
{
"component": "BInputGroup",
Expand Down
1 change: 1 addition & 0 deletions src/components/jumbotron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Jumbotron",
"description": "A lightweight, flexible component that can optionally extend the entire viewport to showcase key marketing messages on your site.",
"components": [
{
"component": "BJumbotron",
Expand Down
1 change: 1 addition & 0 deletions src/components/layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Layout and Grid System",
"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.",
"slug": "layout",
"components": [
"BContainer",
Expand Down
1 change: 1 addition & 0 deletions src/components/link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "Link",
"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.",
"components": [
{
"component": "BLink",
Expand Down
1 change: 1 addition & 0 deletions src/components/list-group/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"meta": {
"title": "List group",
"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.",
"components": [
"BListGroup",
"BListGroupItem"
Expand Down
Loading