2.3 Non JayCraft CMS Configuration - JayBox325/JayPack GitHub Wiki

If you combining JayPack with a CMS, there are some extra bits of config you need to setup.

Initial project config

If you are not using JayCraft, you will need to set what file extension your front end templates are using. By default, cmsTemplateExt is set to twig for CraftCMS. But you will need to update this to whatever your project is using. e.g. php for WordPress.

SVG symbols dist

JayPack takes your SVGs from ./src/assets/svg and creates an SVG Symbols file. This is configured to work with a static Nunjucks or JayCraft site out the box, so once you have set up your distRoot in the ./project-config file, you will need to confirm that your SVG Symbols are being generated in a useful location.

By default they are generated as follows:

  • CraftCMS -> ./build/templates/_includes/svg-symbols.twig
  • Nunjucks -> ./_src/html/_includes/svg-symbols.njk

This file is then includes in the appropriate _base file. Confirm this is being output to fit your project structure in ./_gulp/path.config.js on line ~64.

TailwindCSS purge

As TailwindCSS generates a shed-load of CSS classes, you need to strip those right back when we put your site live. On line ~15 in ./_gulp/tailwind.config.js, we are setting up TailwindCSS' Purge feature to check all of your .html and .twig templates, but obviously, if you're not using .twig or .html files, you will need to add your file extension to this. E.g. for .php files if you are building in WordPress.