
Edit your crontab file with crontab -e then add the following line: * 3 * * * /Users/joe/bin/warm-cache.sh Grav Scheduler With the warm-cache.sh script created you can run this daily by running this file via crontab. In this example, we'll create /Users/joe/bin/warm-cache.sh file with the contents: #!/bin/shĬd /Users/joe/workspace/grav-example-siteīin/plugin warm-cache warm Then we ensure this warm-cache.sh is executable via: chmod +x warm-cache.shĪssuming the bin/ folder is in Joe's path, then anytime we're in the CLI we can simply run: warm-cache.sh Cron Job The simplest way to script the warm cache process for a site we have in /Useres/joe/workspace/grav-example-site is to create a shell script that runs the CLI command. This is because warm-cache simply iterates over the entries in the sitemap and causes Grav to respond with the page requested, hence forcing Grav to warm the cache for that page. Interestingly you can run this from any Grav instance that has warm-cache installed, and warm the cache of any other Grav server that has the sitemap plugin installed. To use this from the CLI you need to call the command pass the URL of the sitemap. The warm-cache plugin also includes a useful CLI command that also be scripted or used via a cron-job or scheduler as needed. You should see a 'toast' message in the top-right corner with a message after completion. This is configurable but is a Tachometer by default. To use warm-cache plugin in the admin, you simply click the icon in the quicktray. You can configure this or use it to filter out these cache-warming calls from your analytics data. User Agent → This is the string set by the crawler that hits each page. Log Results → The results of the cache clear can be logged for debugging errors. Show Count in Results → By default the number of pages that were warmed shows in the results of the call. OnCacheClear Events → When enabled, Clearing the Cache either via Admin or CLI will then trigger a warm-cache call. Quicktray Icon → Allows you to override the default tachometer icon with a different Fontawesome icon Sitemap URL → This defaults to the value set in the Sitemap pluginĮnable Quicktray → Enables or disables the quicktray icon to trigger an Ajax-powered warm-cache call of your site.

When disabled, no tray icon will display.

Plugin status → Will enable or disable the entire plugin. Some examples include: \"įill="currentColor" Warm Cache Configuration
#Admin iconset plus#
There's an svg_icon() twig function available to use but it only takes a path to the SVG icon, plus classes. Using the plugin directly from Twig templates is a little different. Just showing off now with vector stroke modified and a custom rotation. More complex example with TailwindCSS classes for width/height and also a color. Grav Apple Ferrari SpaceXĮxample of some popular brands from Simple Icons. Įxample from HeroIcons / Solid and a TailwindCSS class of w-12 to specify a width. Icon and set defined, but no trailing slash. The more commonly used approach with icon specifically defined. Īnother example with an explicit set defined and no trailing slash. Note, no extension is required for the icon name as they are all SVGs. This will use the default tabler SVG icon set. This is the quickest most basic approach. When you need to use an SVG icon in your content, you can use the shortcode.

Plugin status → Will enable or disable the entire plugin.NEW Iconsax icons (1792) → outline and bold variants (v1.0).Social Icons (6) → A few basic consistent social networking icons (v1.0).Simple Icon Brands (2207) → Over 2100 popular brand icons (v6.0).Hero Icons (230) → Developed by Steve Schoger with both outline and solid variants.Tabler Icons (1424) → Developed by Csaba Kissi (v1.48.0).This package currently contains 3 primary SVG icon sets:
#Admin iconset install#
You can also install the theme via the Plugins section in the admin plugin. The Warm Cache plugin makes use of the sitemap plugin to function properly, so allow installation when prompted.
