Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Craft Setup

Brandon Shallenberger edited this page Mar 23, 2017 · 15 revisions

Using Blendid with CraftCMS

Asset revisions

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.

Blendid init considerations

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,

Watching templates

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/**/*"

Image assets

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.

Clone this wiki locally