-
Notifications
You must be signed in to change notification settings - Fork 682
Craft Setup
Using Blendid with CraftCMS
Use the Gulp Rev Craft Plugin to include the proper gulp-revisioned version of an asset in your Twig templates. More details found in readme.
Upon running yarn run blendid
, unless configured otherwise, Blendid will overwrite the contents of the public/
directory. Prevent this and stop Blendid from processing HTML files by first changing the html
configuration in config/task-config.js
from
html: {
dataFile: "data/global.json",
htmlmin: {
collapseWhitespace: true
},
extensions: ["html", "njk", "json"],
excludeFolders: ["layouts", "shared", "macros", "data"]
},
To
html:false,
In order to have BrowserSync to start watching your templates folder use the files
option in the browserSync
object in config/task-config.js
. By default CraftCMS uses templates from craft/templates
. An example of watching the files within this directory:
files: "./craft/templates/**/*"
Since CraftCMS handles images and Blendid only copies these files from one directory to another by default you can safely set the images
object in task-config.js
to false
.
Visit code.viget.com to see more projects from Viget.