Customize a SiteFarm Subtheme

Using the Basic v.s. Advanced Subthemes

The Basic Subtheme is pretty straight forward and highly recommended over the Advanced.

  • Add CSS to the CSS file at css/styles.css.
  • Add JS to the JS file at js/scripts.js.

These two files are added to the theme as libraries in the .libraries file.

The Advanced Subtheme requires a little more technical knowledge and additional technologies such as Node.js and likely Node Version Manager (NVM). Using the advanced subtheme will allow you to write Syntactically Awesome StyleSheets (SASS) that processes into CSS and inherit SASS variables and mixins from the parent theme. The benefits of this is out of the scope of this documentation, but more detailed instructions are available in the README.md file.

We recommend you use the Basic subtheme unless you have very specific technical needs and the expertise to maintain the advanced version throughout its lifetime.

Clearing Cache

Whether using the Basic or Advanced subtheme, if you do not see expected changes after updating CSS, JS, or templates, we  recommend clearing the cache. You can do this from the command line by typing ddev drush cr.