From 17987ada543c107a193a8798c95b509ec0fc27c2 Mon Sep 17 00:00:00 2001 From: Altan S Date: Wed, 24 Apr 2024 19:39:55 +0200 Subject: [PATCH] Update use-blade-icons.md (#498) * Update use-blade-icons.md Caching Icons for Production Deployment using Trellis * Update use-blade-icons.md --------- Co-authored-by: Ben Word --- sage/use-blade-icons.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sage/use-blade-icons.md b/sage/use-blade-icons.md index a3906a33..cd9d5b3d 100644 --- a/sage/use-blade-icons.md +++ b/sage/use-blade-icons.md @@ -1,9 +1,10 @@ --- -date_modified: 2023-01-27 13:17 +date_modified: 2024-04-24 13:00 date_published: 2022-03-18 20:49 description: How to use the blade-icons package with Sage 10. title: How to use blade-icons authors: + - altan - ben --- @@ -85,6 +86,19 @@ Now Heroicons can be referenced in any of the supported methods from inside your {{ svg('heroicon-s-menu) }} ``` +## Caching icons in production + +It's recommended to enable icon caching to optimize performance by running `wp acorn icons:cache` during deployment. + +If you are using Trellis, modify the `deploy_build_after` hook within your `deploy-hooks/build-after.yml` file: + +```yml +- name: Cache Blade UI Icons + command: wp acorn icons:cache + args: + chdir: "{{ deploy_helper.new_release_path }}" +``` + ## Additional information The [blade-icons README](https://github.com/blade-ui-kit/blade-icons) covers how to pass attributes, set default classes, and more.