Skip to content

Commit

Permalink
fix: try to fix fonts url
Browse files Browse the repository at this point in the history
  • Loading branch information
ginifizz committed Oct 17, 2023
1 parent 34bf2b8 commit eb0a2e1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions utils/clone-documentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ async function cloneDocumentation() {
await fs.copySync('tempRepo/README.md', `${rootPath}/docs/README.md`);
await fs.copySync('tempRepo/spec', `${rootPath}/spec`);
await fs.copySync('tempRepo/schemas', `${rootPath}/public/img/schemas`);

fs.removeSync('tempRepo');

// update css
const data = fs.readFileSync(`${rootPath}/styles/fonts.css`, 'utf8');
const modifiedData = data.replace(new RegExp('/fonts/', 'g'), `${process.env.NEXT_PUBLIC_BASE_URL || ''}/fonts/`);
fs.writeFileSync(`${rootPath}/styles/fonts.css`, modifiedData, 'utf8');
} catch (error) {
console.error(error);
}
Expand Down

0 comments on commit eb0a2e1

Please sign in to comment.