Skip to content

Commit

Permalink
fix title
Browse files Browse the repository at this point in the history
  • Loading branch information
Slashek committed Dec 28, 2023
1 parent 1218e8e commit 873b0f9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app/views/partials/layouts/head/metatags.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
<meta name="description" content='{{ description }}'>

{% comment %} Title {% endcomment %}
{% capture meta_title -%}{{ page.metadata.title | strip_html }}{%- endcapture -%}
{% capture meta_title -%}{% print page.metadata.title | strip_html %}{%- endcapture -%}

{%- if meta_title.size > 0 -%}
{%- capture title -%}{{ meta_title }} | platformOS Docs{%- endcapture -%}
{%- capture title -%}{% print meta_title %} | platformOS Docs{%- endcapture -%}
{%- else -%}
{%- capture title -%}{{ project_name }}{%- endcapture -%}
{%- capture title -%}{% print project_name %}{%- endcapture -%}
{%- endif -%}
<title>{{ title }}</title>
<title>{% print title %}</title>

{% graphql page_dates, slug: context.page.slug %}
query get_dates($slug: String!) {
Expand All @@ -40,8 +40,8 @@ query get_dates($slug: String!) {

<meta property="og:locale" content="en_US" />
<meta property="og:type" content="article" />
<meta property="og:title" content='{{ title }}' />
<meta property="og:description" content='{{ description }}' />
<meta property="og:title" content="{% print title | replace: '"', '' %}" />
<meta property="og:description" content="{% print description | replace: '"', '' %}" />
<meta property="og:url" content="{{ context.location.url }}" />
<meta property="og:site_name" content="platformOS Documentation" />
<meta property="article:section" content="Uncategorized" />
Expand All @@ -54,8 +54,8 @@ query get_dates($slug: String!) {


<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:description" content='{{ description }}' />
<meta name="twitter:title" content='{{ title }}' />
<meta property="twitter:title" content="{% print title | replace: '"', '' %}" />
<meta property="twitter:description" content="{% print description | replace: '"', '' %}" />
<meta name="twitter:image" content="{{ 'images/pos-logo-2to1.png' | asset_url }}" />

<script type='application/ld+json'>
Expand Down Expand Up @@ -103,4 +103,4 @@ query get_dates($slug: String!) {
}
]
}
</script>
</script>

0 comments on commit 873b0f9

Please sign in to comment.