feat: meta description updates

This commit is contained in:
Cory Dransfeldt 2024-05-21 13:31:09 -07:00
parent 81c528e44f
commit 3b9fbf7dec
No known key found for this signature in database
41 changed files with 58 additions and 23 deletions

View file

@ -8,7 +8,18 @@
Books • {{ book.title }} • {{ meta.siteName }}
{% else %}
{{ meta.siteName }}
{% endif %}
{%- endif -%}
{%- endcapture -%}
{%- capture pageDescription -%}
{%- if schema == 'blog' -%}
{{ post_excerpt | markdown | strip_html }}
{% elsif book.description %}
{{ book.description }}
{% elsif description %}
{{ description }}
{% else %}
{{ meta.siteDescription }}
{%- endif -%}
{%- endcapture -%}
{%- capture ogImage -%}
{%- if schema == 'blog' -%}
@ -25,7 +36,7 @@
{{ book.image }}
{%- else -%}
{{ meta.meta_data.opengraph_default }}
{%- endif -%}
{%- endif -%}
{%- endcapture -%}
<!doctype html>
<html lang="en">
@ -38,8 +49,8 @@
<script async data-id="101449513" src="/23af0256fe76a.js"></script>
<link rel="canonical" href="{{ fullUrl }}" />
<meta property="og:title" content="{{ pageTitle }}" />
<meta name="description" content="{% if description %}{{ description }}{% else %}{{ meta.siteDescription }}{% endif %}" />
<meta property="og:description" content="{% if description %}{{ description }}{% else %}{{ meta.siteDescription }}{% endif %}" />
<meta name="description" content="{{ pageDescription | escape | strip }}" />
<meta property="og:description" content="{{ pageDescription | escape | strip }}" />
<meta property="og:type" content="article" />
<meta property="og:url" content="{{ fullUrl }}" />
<meta property="og:image" content="{{ ogImage }}" />

View file

@ -11,7 +11,7 @@ layout: default
{% if yearString == currentYearString %}
<p>I've finished <strong class="highlight-text">{{ bookData.size }} books</strong> this year.</p>
{% else %}
<p>I finished <strong class="highlight-text">{{ bookData.size }} books</strong> in {{ year }}</p>
<p>I finished <strong class="highlight-text">{{ bookData.size }} books</strong> in {{ year }}.</p>
{% endif %}
<hr class="large-spacing" />
{% render "partials/media/grid.liquid", data:bookData, shape: "vertical", count: 200, loading: "eager" %}