Use detail field on book paeg and meta

This commit is contained in:
Mouse Reeve 2021-09-29 11:59:09 -07:00
parent 54a8815f49
commit 47706b5353

View file

@ -4,13 +4,15 @@
{% load humanize %} {% load humanize %}
<p> <p>
{% with format=book.physical_format pages=book.pages %} {% firstof book.physical_format_detail book.physical_format as format %}
{% firstof book.physical_format book.physical_format_detail as format_property %}
{% with pages=book.pages %}
{% if format %} {% if format %}
{% comment %} {% comment %}
@todo The bookFormat property is limited to a list of values whereas the book edition is free text. @todo The bookFormat property is limited to a list of values whereas the book edition is free text.
@see https://schema.org/bookFormat @see https://schema.org/bookFormat
{% endcomment %} {% endcomment %}
<meta itemprop="bookFormat" content="{{ format }}"> <meta itemprop="bookFormat" content="{{ format_property }}">
{% endif %} {% endif %}
{% if pages %} {% if pages %}