Directives
Asset tags
The compiled CSS and JavaScript have the site version in their names. Two directives insert the right tags.
<head>
<!-- include-styles-src -->
</head>
<body>
…
<!-- include-script-src -->
</body>becomes, for a site at version 1.2.0:
<link rel="stylesheet" href="/assets/css/styles-1-2-0.min.css">
<script src="/assets/js/main-1-2-0.min.js"></script>The text must be exactly <!-- include-styles-src --> and <!-- include-script-src -->. The URLs follow workingDir.styles, workingDir.scripts, stylesOutFolder, scriptsOutFolder and the version of your package.json: bump the version and every page points to the new files, so browsers never use a stale cache.
See Styles and scripts for how the files are produced.