From c54a8baa5e23e894f99879bee7f92e3e2739cf2c Mon Sep 17 00:00:00 2001 From: Chris Hubbard Date: Thu, 18 Jan 2024 11:47:29 -0500 Subject: [PATCH] Update path to fonts in styles if deploying to sub directory (#434) --- scripts/convertStyles.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/convertStyles.ts b/scripts/convertStyles.ts index 4e9189f8b..8f39d028e 100644 --- a/scripts/convertStyles.ts +++ b/scripts/convertStyles.ts @@ -41,6 +41,9 @@ export function convertStyles(dataDir: string, verbose: number) { line = line.replace('padding-right', 'padding-inline-end'); line = line.replace('float: left', 'display: inline-block'); } + if (line.includes('/fonts/') && process.env.BUILD_BASE_PATH) { + line = line.replace('/fonts/', process.env.BUILD_BASE_PATH + '/fonts/'); + } return line; }) .join('\n');