diff --git a/src/parser/config.ts b/src/parser/config.ts index 07153923..f8989cfc 100644 --- a/src/parser/config.ts +++ b/src/parser/config.ts @@ -23,4 +23,10 @@ for (const cp of configPaths) { } catch {} } +if (config.styles && config.styles.length > 0) { + const stylePath = + config.styles[0] === '~' ? path.join(homedir(), config.styles.slice(1)) : config.styles; + config.styles = fs.existsSync(stylePath) ? fs.readFileSync(stylePath, 'utf8') : ''; +} + export default config; diff --git a/src/routes/viewer.ts b/src/routes/viewer.ts index 3a579231..9b181266 100644 --- a/src/routes/viewer.ts +++ b/src/routes/viewer.ts @@ -56,6 +56,9 @@ router.get(/.*/, async (req: Request, res: Response) => { +
↩