amphora-html 6.0.0-6 → 6.0.0-8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/media.js +15 -1
- package/package.json +1 -1
- package/.envrc +0 -2
package/lib/media.js
CHANGED
|
@@ -274,6 +274,20 @@ function getStyleFiles(state) {
|
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
+
// check for clay linked font files
|
|
278
|
+
const defaultFontPath = path.join(assetDir, 'css', '_linked-fonts._default.css');
|
|
279
|
+
const siteFontPath = path.join(assetDir, 'css', `_linked-fonts.${siteStyleguide}.css`);
|
|
280
|
+
|
|
281
|
+
// check for inlined font files
|
|
282
|
+
const defaultInlinedFontPath = path.join(assetDir, 'css', '_inlined-fonts._default.css');
|
|
283
|
+
const siteInlinedFontPath = path.join(assetDir, 'css', `_inlined-fonts.${siteStyleguide}.css`);
|
|
284
|
+
|
|
285
|
+
// add any default and site font css
|
|
286
|
+
cssFilePaths.push(defaultFontPath);
|
|
287
|
+
cssFilePaths.push(siteFontPath);
|
|
288
|
+
cssFilePaths.push(defaultInlinedFontPath);
|
|
289
|
+
cssFilePaths.push(siteInlinedFontPath);
|
|
290
|
+
|
|
277
291
|
return cssFilePaths
|
|
278
292
|
.filter(files.fileExists)
|
|
279
293
|
.map(pathJoin(assetHost, assetPath, assetDir));
|
|
@@ -409,7 +423,7 @@ function injectScriptsAndStyles(state) {
|
|
|
409
423
|
if (!locals.edit) {
|
|
410
424
|
mediaMap.styles = combineFileContents(mediaMap.styles, 'public/css', '/css/', STYLE_TAG);
|
|
411
425
|
mediaMap.scripts = !!mediaMap.manifestAssets && mediaMap.manifestAssets.length > 0
|
|
412
|
-
? injectTags(mediaMap.manifestAssets, locals.site,
|
|
426
|
+
? injectTags(mediaMap.manifestAssets, locals.site, SCRIPT_TAG)
|
|
413
427
|
: combineFileContents(mediaMap.scripts, 'public/js', '/js/', SCRIPT_TAG);
|
|
414
428
|
} else {
|
|
415
429
|
mediaMap.styles = module.exports.editStylesTags ? injectTags(mediaMap.styles, locals.site, STYLE_TAG) : combineFileContents(mediaMap.styles, 'public/css', '/css/', STYLE_TAG);
|
package/package.json
CHANGED
package/.envrc
DELETED