add og image dimensions, strip white space
This commit is contained in:
parent
3df4e2a9f8
commit
ef16ac4e38
1 changed files with 20 additions and 11 deletions
|
|
@ -42,24 +42,33 @@
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta
|
<meta
|
||||||
property="og:title"
|
property="og:title"
|
||||||
content="{% if title %}{{ title }}{% else %}{{ meta.siteName }}{% endif %}"
|
content="{%- if discover.title -%}
|
||||||
|
{{- discover.title -}}
|
||||||
|
{%- elif title -%}
|
||||||
|
{{- title -}}
|
||||||
|
{%- else -%}
|
||||||
|
{{- meta.siteName -}}
|
||||||
|
{%- endif -%}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<meta
|
<meta
|
||||||
property="og:image"
|
property="og:image"
|
||||||
content="{% if (layout == 'post') %}
|
content="{%- if layout == 'post' -%}
|
||||||
{{ meta.url }}/assets/og-images/{{ title | slugify }}-preview.jpeg
|
{{- meta.url -}}/assets/og-images/{{ title | slugify }}-preview.jpeg
|
||||||
{% else %}
|
{%- else -%}
|
||||||
{{ meta.url }}{{ meta.opengraph_default }}
|
{{- meta.url -}}{{- meta.opengraph_default -}}
|
||||||
{% endif %}"
|
{%- endif -%}"
|
||||||
/>
|
/>
|
||||||
<meta
|
<meta
|
||||||
property="og:image:alt"
|
property="og:image:alt"
|
||||||
content="{% if (layout == 'post') %}
|
content="{%- if layout == 'post' -%}
|
||||||
{{ title }}
|
{{- title -}}
|
||||||
{% else %}
|
{%- else -%}
|
||||||
{{ meta.opengraph_default_alt }}
|
{{- meta.opengraph_default_alt -}}
|
||||||
{% endif %}"
|
{%- endif -%}"
|
||||||
/>
|
/>
|
||||||
|
<meta property="og:image:width" content="1200" />
|
||||||
|
<meta property="og:image:height" content="630" />
|
||||||
<meta
|
<meta
|
||||||
property="og:description"
|
property="og:description"
|
||||||
content="{% if description %}{{ description }}{% else %}{{ meta.siteDescription }}{% endif %}"
|
content="{% if description %}{{ description }}{% else %}{{ meta.siteDescription }}{% endif %}"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue