Skip to content

Commit

Permalink
v4: Social meta tags (#20825)
Browse files Browse the repository at this point in the history
* descriptions for getting started pages

* descriptions for layout

* add content page descriptions

* more descriptions, updates to some existing ones

* correct site url

* add social stuff to config for twitter cards

* add twitter meta tags; use large image for homepage and regular card for all others

* add the assets

* more site config

* more social shiz to partial, remove existing meta for the partial, remove page title from homepage for simpler if statements
  • Loading branch information
mdo authored Oct 3, 2016
1 parent bb4af05 commit 7bf868a
Show file tree
Hide file tree
Showing 53 changed files with 93 additions and 8 deletions.
10 changes: 9 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,22 @@ destination: _gh_pages
host: 0.0.0.0
port: 9001
baseurl: ""
url: http://getbootstrap.com
url: http://v4-alpha.getbootstrap.com
encoding: UTF-8
exclude: [assets/scss/]

gems:
- jekyll-redirect-from
- jekyll-sitemap

# Social
title: Bootstrap
description: The most popular HTML, CSS, and JS framework in the world.
twitter: getbootstrap
authors: Mark Otto, Jacob Thornton, and Bootstrap contributors
social_logo_path: /assets/brand/bootstrap-social-logo.png
social_image_path: /assets/brand/bootstrap-social.png

# Custom vars
current_version: 4.0.0-alpha.4
repo: https://github.com/twbs/bootstrap
Expand Down
10 changes: 5 additions & 5 deletions docs/_includes/header.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Bootstrap, a sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.">
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">

<title>
{% if page.layout == "home" %}
{{ page.title }}
{% if page.title %}
{{ page.title }} &middot; {{ site.title }}
{% else %}
{{ page.title }} &middot; Bootstrap
{{ site.title }} &middot; {{ site.description }}
{% endif %}
</title>

{% include social.html %}

<!-- Bootstrap core CSS -->
{% if site.github %}
<link href="{{ site.baseurl }}/dist/css/bootstrap.min.css" rel="stylesheet">
Expand Down
31 changes: 31 additions & 0 deletions docs/_includes/social.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!-- Twitter -->
<meta name="twitter:site" content="@{{ site.twitter }}">
<meta name="twitter:creator" content="@{{ site.twitter }}">

{% if page.title %}
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="{{ page.title }}">
<meta name="twitter:description" content="{{ page.description }}">
<meta name="twitter:image" content="{{ site.url }}{{ site.social_logo_path }}">
{% else %}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ site.title }}">
<meta name="twitter:description" content="{{ site.description }}">
<meta name="twitter:image" content="{{ site.url }}{{ site.social_image_path }}">
{% endif %}

<!-- Facebook -->
{% if page.title %}
<meta property="og:url" content="{{ site.url }}{{ page.url }}">
<meta property="og:title" content="{{ page.title }}">
<meta property="og:description" content="{{ page.description }}">
{% else %}
<meta property="og:url" content="{{ site.url }}">
<meta property="og:title" content="{{ site.title }}">
<meta property="og:description" content="{{ site.description }}">
{% endif %}
<meta property="og:image" content="{{ site.url }}{{ site.social_image_path }}">

<!-- Meta -->
<meta name="description" content="{{ site.description }}">
<meta name="author" content="{{ site.authors }}">
1 change: 1 addition & 0 deletions docs/about/brand.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Brand guidelines
description: Documentation and examples for Bootstrap's logo and brand usage guidelines.
group: about
---

Expand Down
1 change: 1 addition & 0 deletions docs/about/history.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: History
description: A brief overview of the history of Bootstrap.
group: about
redirect_from: "/about/"
---
Expand Down
1 change: 1 addition & 0 deletions docs/about/license.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: License FAQs
description: Commonly asked questions about Bootstrap's open source license.
group: about
---

Expand Down
1 change: 1 addition & 0 deletions docs/about/team.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Team
description: An overview of the founding team and core contributors to Bootstrap.
group: about
---

Expand Down
1 change: 1 addition & 0 deletions docs/about/translations.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Translations
description: Links to community-translated Bootstrap documentation sites.
group: about
---

Expand Down
Binary file added docs/assets/brand/bootstrap-social-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/brand/bootstrap-social.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/components/alerts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Alerts
description: Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/breadcrumb.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Breadcrumb
description: Indicate the current page's location within a navigational hierarchy.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/button-group.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Button group
description: Group a series of buttons together on a single line with the button group, and super-power them with JavaScript.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/buttons.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Buttons
description: Use Bootstrap's custom button styles for actions in forms, dialogs, and more with support for multiple sizes, states, and more.
group: components
redirect_from: "/components/"
---
Expand Down
1 change: 1 addition & 0 deletions docs/components/card.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Cards
description: Bootstrap Cards provide a flexible and extensible content container with multiple variants and options.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/carousel.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Carousel
description: A slideshow component for cycling through elements—images or slides of text—like a carousel.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/collapse.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Collapse
description: Toggle the visibility of content across your project with a few classes and our JavaScript plugins.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/dropdowns.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Dropdowns
description: Toggle contextual overlays for displaying lists of links and more with the Bootstrap dropdown plugin.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/forms.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Forms
description: Examples and usage guidelines for from controls, form layouts, and custom forms.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/input-group.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Input group
description: Extend form controls with the input group.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/jumbotron.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Jumbotron
description: Lightweight, flexible component for showcasing hero unit style content.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/list-group.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: List group
description: Learn about Bootstrap's list group component for rendering series of related content.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/modal.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Modal
description: Learn how to use Bootstrap's modals to add dialog prompts to your site.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/navbar.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Navbar
description: Documentation and examples for Bootstrap's powerful, responsive navigation header.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/navs.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Navs
description: Documentation and examples for how to use Bootstrap's included navigation components.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/pagination.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Pagination
description: Documentation and examples for showing pagination links.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/popovers.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Popovers
description: Documentation and examples for adding Bootstrap popovers to your site.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/progress.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Progress
description: Documentation and examples for using Bootstrap progress bars.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/scrollspy.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Scrollspy
description: Documentation and examples for the scrollspy plugin with Bootstrap's navigation components.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/tag.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Tags
description: Documentation and examples for tags, our small label-badge component.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/components/tooltips.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Tooltips
description: Documentation and examples for adding custom Bootstrap tooltips with CSS and JavaScript.
group: components
---

Expand Down
1 change: 1 addition & 0 deletions docs/content/code.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Code
description: Documentation and examples for displaying inline and multiline blocks of code with Bootstrap.
group: content
---

Expand Down
3 changes: 2 additions & 1 deletion docs/content/figures.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
layout: docs
title: Figures
description: Documentation and examples for displaying related images and text with the figure component in Bootstrap.
group: content
---

Anytime you need to display a piece of content—like an imagewith an optional caption, consider using a `<figure>`.
Anytime you need to display a piece of content—like an image with an optional caption, consider using a `<figure>`.

Use the included `.figure` , `.figure-img` and `.figure-caption` classes to provide some baseline styles for the HTML5 `<figure>` and `<figcaption>` elements. Images in figures have no explicit size, so be sure to add the `.img-fluid` class to your `<img>` to make it responsive.

Expand Down
1 change: 1 addition & 0 deletions docs/content/images.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Images
description: Documentation and examples for styling images with Bootstrap.
group: content
---

Expand Down
1 change: 1 addition & 0 deletions docs/content/reboot.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Reboot
description: Documentation and examples for Reboot, Bootstrap's collection of element-specific CSS that builds on Normalize.css.
group: content
redirect_from: "/content/"
---
Expand Down
1 change: 1 addition & 0 deletions docs/content/tables.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Tables
description: Documentation and examples for styling tables with Bootstrap.
group: content
---

Expand Down
1 change: 1 addition & 0 deletions docs/content/typography.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Typography
description: Documentation and examples for Bootstrap typography, including global settings, body text, lists, and more.
group: content
---

Expand Down
1 change: 1 addition & 0 deletions docs/getting-started/accessibility.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Accessibility
description: Learn how Bootstrap supports common web standards for making sites that are accessibile to those using assistive technology.
group: getting-started
---

Expand Down
1 change: 1 addition & 0 deletions docs/getting-started/best-practices.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Best practices
description: Learn about some of the best practices we've gathered from years of working on and using Bootstrap.
group: getting-started
---

Expand Down
1 change: 1 addition & 0 deletions docs/getting-started/browsers-devices.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Browsers and devices
description: Learn which browsers and devices are supported by Bootstrap.
group: getting-started
---

Expand Down
1 change: 1 addition & 0 deletions docs/getting-started/build-tools.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Build tools
description: Details on how to use Bootstrap's included build tools to compile source code, run tests, and more.
group: getting-started
---

Expand Down
1 change: 1 addition & 0 deletions docs/getting-started/contents.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Contents
description: Learn about what's included in Bootstrap's precompiled and source code directories.
group: getting-started
---

Expand Down
1 change: 1 addition & 0 deletions docs/getting-started/download.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Download
description: Download Bootstrap's compiled CSS and JavaScript, source code, or include it with your favorite package manager.
group: getting-started
---

Expand Down
1 change: 1 addition & 0 deletions docs/getting-started/flexbox.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: docs
title: Flexbox
description: Learn how to enable flexbox support in Bootstrap 4 with the flick of a variable or the swap of a stylesheet.
group: getting-started
---

Expand Down
Loading

0 comments on commit 7bf868a

Please sign in to comment.