Skip to content

Commit

Permalink
Update path to fonts in styles if deploying to sub directory (#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvire authored Jan 18, 2024
1 parent 54d1198 commit c54a8ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/convertStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit c54a8ba

Please sign in to comment.