AnyCable website generator (https://anycable.io).
Includes:
Run npm install and then npm start or gulp to start dev server with livereload.
Use svgo to optimize SVG images.
For animated illustration use: svgo --disable=moveGroupAttrsToElems --disable=convertTransform src/images/illustration.svg src/images/illustration.min.svg
When you run yarn install (or jspm install explicitly) it updates the jspm.config.js in the following way:
},
paths: {
"*": "src/js/*.js",
- "github:*": "/jspm_packages/github/*",
- "npm:*": "/jspm_packages/npm/*"
+ "github:*": "jspm_packages/github/*",
+ "npm:*": "jspm_packages/npm/*"
},
baseUrl: "/",This configuration breaks non-root pages; revert this change to use the absolute path.
To send custom events to GTM do the following:
- For links (or link-like elements) use
gtm-linkclass and specify action and category usingdata-gtm-actionanddata-gtm-categoryattributes:
a.gtm-link(href="#", data-gtm-category="landingButton", data-gtm-action="tryIt1")-
For footer links you can alternatively just add a
gtm-footer-linkclass without specifying any data attributes (footerLinkscategoryandactionderived from the link text will be used automatically). Theactionvalue could be overriden by settingdata-gtm-actionattribute. -
For form submissions use
gtm-formclass and the samedata-gtm-categoryanddata-gtm-actionattributes.
NOTE: in development, we print events in the console instead of sending them to GTM. See dochead.pug for more.