Skip to content

Commit 7bf868a

Browse files
authored
v4: Social meta tags (twbs#20825)
* 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
1 parent bb4af05 commit 7bf868a

Some content is hidden

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

53 files changed

+93
-8
lines changed

_config.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,22 @@ destination: _gh_pages
1414
host: 0.0.0.0
1515
port: 9001
1616
baseurl: ""
17-
url: http://getbootstrap.com
17+
url: http://v4-alpha.getbootstrap.com
1818
encoding: UTF-8
1919
exclude: [assets/scss/]
2020

2121
gems:
2222
- jekyll-redirect-from
2323
- jekyll-sitemap
2424

25+
# Social
26+
title: Bootstrap
27+
description: The most popular HTML, CSS, and JS framework in the world.
28+
twitter: getbootstrap
29+
authors: Mark Otto, Jacob Thornton, and Bootstrap contributors
30+
social_logo_path: /assets/brand/bootstrap-social-logo.png
31+
social_image_path: /assets/brand/bootstrap-social.png
32+
2533
# Custom vars
2634
current_version: 4.0.0-alpha.4
2735
repo: https://github.com/twbs/bootstrap

docs/_includes/header.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<meta charset="utf-8">
22
<meta http-equiv="X-UA-Compatible" content="IE=edge">
33
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
4-
<meta name="description" content="Bootstrap, a sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.">
5-
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
64

75
<title>
8-
{% if page.layout == "home" %}
9-
{{ page.title }}
6+
{% if page.title %}
7+
{{ page.title }} &middot; {{ site.title }}
108
{% else %}
11-
{{ page.title }} &middot; Bootstrap
9+
{{ site.title }} &middot; {{ site.description }}
1210
{% endif %}
1311
</title>
1412

13+
{% include social.html %}
14+
1515
<!-- Bootstrap core CSS -->
1616
{% if site.github %}
1717
<link href="{{ site.baseurl }}/dist/css/bootstrap.min.css" rel="stylesheet">

docs/_includes/social.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!-- Twitter -->
2+
<meta name="twitter:site" content="@{{ site.twitter }}">
3+
<meta name="twitter:creator" content="@{{ site.twitter }}">
4+
5+
{% if page.title %}
6+
<meta name="twitter:card" content="summary">
7+
<meta name="twitter:title" content="{{ page.title }}">
8+
<meta name="twitter:description" content="{{ page.description }}">
9+
<meta name="twitter:image" content="{{ site.url }}{{ site.social_logo_path }}">
10+
{% else %}
11+
<meta name="twitter:card" content="summary_large_image">
12+
<meta name="twitter:title" content="{{ site.title }}">
13+
<meta name="twitter:description" content="{{ site.description }}">
14+
<meta name="twitter:image" content="{{ site.url }}{{ site.social_image_path }}">
15+
{% endif %}
16+
17+
<!-- Facebook -->
18+
{% if page.title %}
19+
<meta property="og:url" content="{{ site.url }}{{ page.url }}">
20+
<meta property="og:title" content="{{ page.title }}">
21+
<meta property="og:description" content="{{ page.description }}">
22+
{% else %}
23+
<meta property="og:url" content="{{ site.url }}">
24+
<meta property="og:title" content="{{ site.title }}">
25+
<meta property="og:description" content="{{ site.description }}">
26+
{% endif %}
27+
<meta property="og:image" content="{{ site.url }}{{ site.social_image_path }}">
28+
29+
<!-- Meta -->
30+
<meta name="description" content="{{ site.description }}">
31+
<meta name="author" content="{{ site.authors }}">

docs/about/brand.md

Lines changed: 1 addition & 0 deletions

docs/about/history.md

Lines changed: 1 addition & 0 deletions

docs/about/license.md

Lines changed: 1 addition & 0 deletions

docs/about/team.md

Lines changed: 1 addition & 0 deletions

docs/about/translations.md

Lines changed: 1 addition & 0 deletions
45.1 KB
330 KB

docs/components/alerts.md

Lines changed: 1 addition & 0 deletions

docs/components/breadcrumb.md

Lines changed: 1 addition & 0 deletions

docs/components/button-group.md

Lines changed: 1 addition & 0 deletions

docs/components/buttons.md

Lines changed: 1 addition & 0 deletions

docs/components/card.md

Lines changed: 1 addition & 0 deletions

docs/components/carousel.md

Lines changed: 1 addition & 0 deletions

docs/components/collapse.md

Lines changed: 1 addition & 0 deletions

docs/components/dropdowns.md

Lines changed: 1 addition & 0 deletions

docs/components/forms.md

Lines changed: 1 addition & 0 deletions

docs/components/input-group.md

Lines changed: 1 addition & 0 deletions

docs/components/jumbotron.md

Lines changed: 1 addition & 0 deletions

docs/components/list-group.md

Lines changed: 1 addition & 0 deletions

docs/components/modal.md

Lines changed: 1 addition & 0 deletions

docs/components/navbar.md

Lines changed: 1 addition & 0 deletions

docs/components/navs.md

Lines changed: 1 addition & 0 deletions

docs/components/pagination.md

Lines changed: 1 addition & 0 deletions

docs/components/popovers.md

Lines changed: 1 addition & 0 deletions

docs/components/progress.md

Lines changed: 1 addition & 0 deletions

docs/components/scrollspy.md

Lines changed: 1 addition & 0 deletions

docs/components/tag.md

Lines changed: 1 addition & 0 deletions

docs/components/tooltips.md

Lines changed: 1 addition & 0 deletions

docs/content/code.md

Lines changed: 1 addition & 0 deletions

docs/content/figures.md

Lines changed: 2 additions & 1 deletion

docs/content/images.md

Lines changed: 1 addition & 0 deletions

docs/content/reboot.md

Lines changed: 1 addition & 0 deletions

docs/content/tables.md

Lines changed: 1 addition & 0 deletions

docs/content/typography.md

Lines changed: 1 addition & 0 deletions

docs/getting-started/accessibility.md

Lines changed: 1 addition & 0 deletions

docs/getting-started/best-practices.md

Lines changed: 1 addition & 0 deletions

docs/getting-started/browsers-devices.md

Lines changed: 1 addition & 0 deletions

docs/getting-started/build-tools.md

Lines changed: 1 addition & 0 deletions

docs/getting-started/contents.md

Lines changed: 1 addition & 0 deletions

docs/getting-started/download.md

Lines changed: 1 addition & 0 deletions

docs/getting-started/flexbox.md

Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)