I am new to Grav and trying to redevelop a long standing web-site for the British Hoverfly Recording Scheme. This will have a page for each species (just under 300 at present) presenting some informations, distribution maps, phenology plots, status and trend information, etc. It also shows pictures of the species if available (currently, images are there for about 80 species). I am using unite-gallery plugin to display these hoverfly images.
The information pesented often involves citing references and, for this purpose, I am using the bibliography plugin.
Bibliography works fine in parts of the site with no image gallery. For example, see this explanation page. However, on the species pages (e.g. Anasimyia lineata), the citations are often not rendered - so something like “according to Ball & Morris, 2024[^HKB6B3NI]” is displayed and there is no reference list at the bottom of the page. But this is not consistent and, sometimes, the bibliography info is rendered correctly. I find that if I clear all caches and then refresh the page it often renders correctly - but if I go elsewhere on the site and return to that page, it fails to render the bibliographic info again!
The header section for species pages is like this
---
title: Anasimyia lineata
taxonomy:
category: species
unitegallery:
gallery_theme: compact
bibliography: hover_refs.json
never_cache_twig: true
---
The “never_cache_twig” setting comes from the unite gallery documentation - “Issues with page caching” section. Removing this setting does not seem to make any difference to the issue.
Bibliography plugin needs markdown extra to be enabled and I have done this globally in my system.yaml as suggested in its documentation.
I am using the quark theme, but have used inheritance to make my own version and have over-ridden the blog-item.html.twig partial to call unite-gallery like this
<div class="e-content">
{% if page.media.images | length > 0 %}
<div class="gallery-container {{ page.header.class }}">
{{ unite_gallery(page.media.images, '{"gallery_theme":"' ~ page.header.unitegallery.gallery_theme ~ '",
"slider_enable_text_panel": true,
"slider_textpanel_enable_title": false,
"gallery_height": 750
}') | raw }}"
</div>
{% endif %}
{{ page.content|raw }}
</div>
I have searched extensively for info and code examples for these two plugins and some of the examples for unite-gallery have
process:
twig: true
twig_first: true
in the page header. I have tried this (and also changing twing_first to false) but it does not seem to make any difference. I suspect the problem is in some interaction between markdown and twig processing, but it goes well beyong my current level of Grav experience.
I would be very grateful for any suggestions!