From 12b089bb928c60e8ac3ef5d519d657b16194327e Mon Sep 17 00:00:00 2001 From: james-owen Date: Fri, 4 Nov 2022 12:48:06 -0400 Subject: [PATCH 1/4] feat: handle linked font files --- lib/media.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/media.js b/lib/media.js index f9165f7..16b0531 100644 --- a/lib/media.js +++ b/lib/media.js @@ -274,6 +274,14 @@ function getStyleFiles(state) { } } + // check for clay compile linked? clay compile font files? + const defaultFontPath = path.join(assetDir, 'css', '_linked-fonts._default.css'); + const siteFontPath = path.join(assetDir, 'css', `_linked-fonts.${siteStyleguide}.css`); + + // add any default and site font css + cssFilePaths.push(defaultFontPath); + cssFilePaths.push(siteFontPath); + return cssFilePaths .filter(files.fileExists) .map(pathJoin(assetHost, assetPath, assetDir)); From 4b5b0ecaa5d09c32fc8e60d2253a37af7eeba4d4 Mon Sep 17 00:00:00 2001 From: Intellisys Date: Wed, 15 Mar 2023 11:24:56 -0400 Subject: [PATCH 2/4] Updated the version --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4ad7d53..fe2b5b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "amphora-html", - "version": "6.0.0-7", + "version": "6.0.0-8", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 98d1174..46324ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "amphora-html", - "version": "6.0.0-7", + "version": "6.0.0-8", "description": "An HTML renderer for component data", "main": "index.js", "scripts": { From 000af4b9b1beba9881dbde0ee582ffd1d036c3c0 Mon Sep 17 00:00:00 2001 From: Intellisys Date: Wed, 22 Mar 2023 11:04:51 -0400 Subject: [PATCH 3/4] Check and add inlined font files --- lib/media.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/media.js b/lib/media.js index 16b0531..ed1e57f 100644 --- a/lib/media.js +++ b/lib/media.js @@ -278,9 +278,15 @@ function getStyleFiles(state) { const defaultFontPath = path.join(assetDir, 'css', '_linked-fonts._default.css'); const siteFontPath = path.join(assetDir, 'css', `_linked-fonts.${siteStyleguide}.css`); + // check for inlined font files + const defaultInlinedFontPath = path.join(assetDir, 'css', '_inlined-fonts._default.css'); + const siteInlinedFontPath = path.join(assetDir, 'css', `_inlined-fonts.${siteStyleguide}.css`); + // add any default and site font css cssFilePaths.push(defaultFontPath); cssFilePaths.push(siteFontPath); + cssFilePaths.push(defaultInlinedFontPath); + cssFilePaths.push(siteInlinedFontPath); return cssFilePaths .filter(files.fileExists) From 38f990d6e9b245d5578202a09df062f3ae51bd3b Mon Sep 17 00:00:00 2001 From: Intellisys Date: Wed, 29 Mar 2023 15:16:35 -0400 Subject: [PATCH 4/4] Updated a comment --- lib/media.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/media.js b/lib/media.js index ed1e57f..c107ad6 100644 --- a/lib/media.js +++ b/lib/media.js @@ -274,7 +274,7 @@ function getStyleFiles(state) { } } - // check for clay compile linked? clay compile font files? + // check for clay linked font files const defaultFontPath = path.join(assetDir, 'css', '_linked-fonts._default.css'); const siteFontPath = path.join(assetDir, 'css', `_linked-fonts.${siteStyleguide}.css`);