Skip to content

Commit

Permalink
Descriptions now look sane -
Browse files Browse the repository at this point in the history
  • Loading branch information
dannystaple committed Jan 21, 2025
1 parent 363458f commit 3fd8f8c
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions _includes/layouts/common.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@
<meta name="og:site_name" property="og:site_name" content="Orionrobots" />
<meta property="og:type" name="og:type" content="article" />
<meta name="og:title" property="og:title" content="{{ title }} | {{ site_title }} - {{ site_tagline }}" />
{% if description %}
<meta name="og:description" property="og:description" content="{{ description }}" />
{% endif %}
{% capture real_description -%}
{% if description -%}
{{ description }}
{%- else -%}
{{ content | strip_html | strip_newlines | truncatewords: 50 }}
{%- endif -%}
{%- endcapture %}
<meta name="og:description" property="og:description" content="{{ real_description }}" />
<meta name="description" content="{{ real_description }}">

{% if thumbnail %}
<meta name="og:image" property="og:image" content="{{ BASE_PATH }}/{% thumbnail_from_path thumbnail %}" />
<meta name="twitter:image" content="{{ BASE_PATH }}/{% thumbnail_from_path thumbnail %}" />
Expand All @@ -34,11 +41,9 @@

<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ title }} | {{ site_title }} - {{ site_tagline }}</title>
{% if description %}<meta name="description" content="{{ description }}">{% endif %}
<meta name="author" content="{{ author | default: "Danny Staple"}}">
<meta name="article:author" property="article:author" content="{{ author | default: "Danny Staple"}}">


<script type="text/javascript" src="/dist/bundle.js"></script>
{% capture css %}{% include css/bootstrap-style.css %}{% endcapture %}
<style>{{ css | cssmin }}
Expand Down

0 comments on commit 3fd8f8c

Please sign in to comment.