WIP

  1. Get a sandbox

Ckz54 B2B Theme

PRODUCTION SETUP

Remember to bundle/minify/move it to a CDN for PRODUCTION:

  • All custom handlebars templates compiled and merged into one js file and moved into a CDN
  • Any js that needs to be run at the beginning of the html into one js file and moved into a CDN
  • Any js that needs to be run at the bottom of the html into one js file and moved into a CDN

You may have to update the paths of the CCRZ.util.template override or the custom hk_userinterface class to point to the CDN.

Cache them in the browser! (Salesforce and VF communities are not very good for this tho. There is limited control of what you can do if not using a CDN)

  • Do:
    • Use the Cache-Control and ETag headers to control cache behavior for static assets
    • Set long max-age values to reap the benefits of browser cache
    • Use fingerprinting or versioning for cache busting
  • Don't:
    • Use HTML meta tags to specify cache behavior
    • Use query strings for cache busting

Compiling Handlebars

In order to compile your templates, you will need handlebars to be installed in your machine. Alternatively, you could use the docker container maintained by office numero 2 here: https://hub.docker.com/r/numero2/num2_handlebarsgulp/

Once you have handlebars installed, all you need to do is run this command (for each file):

handlebars hbs/<uncompiled_handlebars_file.hbs> -f <compiled_handlebars_file.tpl.js>
1