mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Add Twitter card info
This commit is contained in:
parent
6fd25a0e5a
commit
d284edc556
@ -128,3 +128,6 @@ social:
|
|||||||
visible: false
|
visible: false
|
||||||
facebook:
|
facebook:
|
||||||
app_id: 338291289691179
|
app_id: 338291289691179
|
||||||
|
|
||||||
|
twitter:
|
||||||
|
account: balloob
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
|
{% if page.description %}{% capture fb_description %}{{ page.description }}{% endcapture %}{% else %}{% capture fb_description %}{{ content | raw_content }}{% endcapture %}{% endif %}
|
||||||
|
{% capture description %}{% if page.description %}{{ page.description }}{% elsif site.description %}{{ site.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %}
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
||||||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
||||||
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
|
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
|
||||||
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
|
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
|
||||||
|
|
||||||
{% if page.description %} {% capture fb_description %}{{ page.description }}{% endcapture %} {% else %} {% capture fb_description %}{{ content | raw_content }}{% endcapture %} {% endif %}
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}</title>
|
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}</title>
|
||||||
<meta name="author" content="{{ site.author }}">
|
<meta name="author" content="{{ site.author }}">
|
||||||
{% capture description %}{% if page.description %}{{ page.description }}{% elsif site.description %}{{ site.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %}
|
|
||||||
<meta name="description" content="{{ description | strip_html | condense_spaces | truncate:150 }}">
|
<meta name="description" content="{{ description | strip_html | condense_spaces | truncate:150 }}">
|
||||||
{% if page.keywords %}<meta name="keywords" content="{{ page.keywords }}">{% endif %}
|
{% if page.keywords %}<meta name="keywords" content="{{ page.keywords }}">{% endif %}
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
<link rel="canonical" href="{{ page.url | canonical_url }}">
|
<link rel="canonical" href="{{ page.url | canonical_url }}">
|
||||||
{% if site.social.facebook.app_id %}
|
|
||||||
<meta property="fb:app_id" content="{{ site.social.facebook.app_id }}">
|
<meta property="fb:app_id" content="{{ site.social.facebook.app_id }}">
|
||||||
<meta property="og:title" content="{% if post.title %}{{ post.title }}{% elsif page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
|
<meta property="og:title" content="{% if post.title %}{{ post.title }}{% elsif page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
|
||||||
<meta property="og:site_name" content="{{ site.title }}">
|
<meta property="og:site_name" content="{{ site.title }}">
|
||||||
@ -23,9 +23,15 @@
|
|||||||
<meta property="og:type" content="{% if page.categories %}article{% else %}website{% endif %}">
|
<meta property="og:type" content="{% if page.categories %}article{% else %}website{% endif %}">
|
||||||
<meta property="og:description" content="{{ fb_description | strip_html | condense_spaces | truncate:200 }}">
|
<meta property="og:description" content="{{ fb_description | strip_html | condense_spaces | truncate:200 }}">
|
||||||
<meta property="og:image" content="{% if page.og_image %}{{ page.og_image | prepend: site.url }}{% else %}https://home-assistant.io/images/home-assistant-logo-2164x2164.png{% endif %}">
|
<meta property="og:image" content="{% if page.og_image %}{{ page.og_image | prepend: site.url }}{% else %}https://home-assistant.io/images/home-assistant-logo-2164x2164.png{% endif %}">
|
||||||
{% endif %}
|
|
||||||
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
|
<meta name="twitter:site" content="@{{ site.social.twitter.account }}">
|
||||||
|
<meta name="twitter:title" content="{% if post.title %}{{ post.title }}{% elsif page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
|
||||||
|
<meta name="twitter:description" content="{{ fb_description | strip_html | condense_spaces | truncate:200 }}">
|
||||||
|
<meta name="twitter:image" content="{% if page.og_image %}{{ page.og_image | prepend: site.url }}{% else %}https://home-assistant.io/images/home-assistant-logo-2164x2164.png{% endif %}">
|
||||||
|
|
||||||
<link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
|
<link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
|
||||||
<link href="{{ root_url }}{{ site.subscribe_rss }}" rel="alternate" title="{{ site.title }}" type="application/atom+xml">
|
<link href="{{ root_url }}{{ site.subscribe_rss }}" rel="alternate" title="{{ site.title }}" type="application/atom+xml">
|
||||||
<link rel='shortcut icon' href='{{ root_url }}/images/favicon.ico' />
|
<link rel='shortcut icon' href='{{ root_url }}/images/favicon.ico' />
|
||||||
<link rel='icon' type='image/png' href='{{ root_url }}/images/favicon-192x192.png' sizes='192x192' />
|
<link rel='icon' type='image/png' href='{{ root_url }}/images/favicon-192x192.png' sizes='192x192' />
|
||||||
</head>
|
</head>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user