Skip to content

Commit

Permalink
fixed title for og preview, otherwise its "blank" (alshedivat#531)
Browse files Browse the repository at this point in the history
* fixed title for og preview, otherwise its "blank"

* Update _includes/metadata.html

Co-authored-by: Maruan <alshedivat@users.noreply.github.com>
  • Loading branch information
2 people authored and horaciochacon committed Feb 28, 2023
1 parent 8c3150f commit 4232eee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _includes/metadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
{%- if site.serve_og_meta %}

<!-- OpenGraph -->
<meta property="og:site_name" content="{{ site.title }}" />
<meta property="og:site_name" content="{{ title }}" />
<meta property="og:type" content="website" />
<meta property="og:title" content="{%- if page.title -%}{{ site.title }} | {{ page.title }}{%- else -%}{{ site.title }}{%- endif -%}" />
<meta property="og:title" content="{%- if page.title -%}{{ title }} | {{ page.title }}{%- else -%}{{ title }}{%- endif -%}" />
<meta property="og:url" content="{{ page.url | prepend: site.baseurl | prepend: site.url | remove_first: 'index.html' }}" />
<meta property="og:description" content="{%- if page.description -%}{{ page.description }}{%- else -%}{{ site.description }}{%- endif -%}" />
{% if page.og_image or site.og_image -%}
Expand All @@ -45,7 +45,7 @@

<!-- Twitter card -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="{%- if page.title -%}{{ page.title }}{%- else -%}{{ site.title }}{%- endif -%}" />
<meta name="twitter:title" content="{%- if page.title -%}{{ page.title }}{%- else -%}{{ title }}{%- endif -%}" />
<meta name="twitter:description" content="{%- if page.description -%}{{ page.description }}{%- else -%}{{ site.description }}{%- endif -%}" />
{% if page.og_image or site.og_image -%}
<meta name="twitter:image" content="{%- if page.og_image -%}{{ page.og_image }}{%- else -%}{{ site.og_image }}{%- endif -%}" />
Expand Down

0 comments on commit 4232eee

Please sign in to comment.