chore: book meta + og images

This commit is contained in:
Cory Dransfeldt 2024-05-21 12:40:29 -07:00
parent 3ccc07ee63
commit 41d3d4b8c3
No known key found for this signature in database
2 changed files with 7 additions and 1 deletions

View file

@ -1,9 +1,11 @@
{%- capture fullUrl -%}{{ meta.url }}{{ page.url }}{%- endcapture -%}
{%- capture pageTitle -%}
{% if page.url | isPost %}
{%- if schema == 'blog' -%}
{{ title }}
{% elsif title %}
{{ title }} • {{ meta.siteName }}
{% elsif book.title %}
Books • {{ book.title }} • {{ meta.siteName }}
{% else %}
{{ meta.siteName }}
{% endif %}
@ -19,6 +21,8 @@
{%- elsif schema == 'books' -%}
{%- assign featuredBook = books | bookStatus: 'started' | reverse | first -%}
{{ featuredBook.image }}
{%- elsif schema == 'book' -%}
{{ book.image }}
{%- else -%}
{{ meta.meta_data.opengraph_default }}
{%- endif -%}

View file

@ -5,6 +5,8 @@ pagination:
size: 1
alias: book
permalink: /books/{{ book.isbn }}/
isbn: {{ book.isbn }}
schema: book
---
<a class="back-link-header link-icon flex-centered" href="/books">{% tablericon "arrow-left" "Go back" %} Go back</a>
<article class="book-focus">