diff --git a/README.md b/README.md index c61c6b8..32e5e10 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,12 @@ Every page can override config options. You can pass theme as a third parameter {{ photoswipe('id', 'a', page.header.photoswipe.options) }} ``` +> **If you call the Twig photoswipe function from a modular template**, you must add this to the modular page's frontmatter: `never_cache_twig: true`. You don't need to do this if your site has caching disabled. +> +> If caching is enabled _and_ your photoswipe gallery is invoked in a modular template, all of the assets that make photoswipe work are omitted from the cache. You will see the gallery unstyled and unscripted and lightboxes will not work. +> +> [Issue #1: Assets not loading with twig cache enabled](https://github.com/Karmalakas/grav-plugin-photoswipe/issues/1) has more details. + ## Installation Installing the Photoswipe plugin can be done in one of three ways: The GPM (Grav Package Manager) installation method lets you quickly install the plugin with a simple terminal command, the manual method lets you do so via a zip file, and the admin method lets you do so via the Admin Plugin.