mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 02:52:27 +08:00
server: Fix path on dev environment
This commit is contained in:
parent
48e6c1a33d
commit
f8777b0de1
@ -9,6 +9,7 @@ import themeNames from "./code_block_theme_names.json" with { type: "json" }
|
||||
import { t } from "i18next";
|
||||
import { join } from "path";
|
||||
import { getResourceDir } from "./utils.js";
|
||||
import env from "./env.js";
|
||||
|
||||
/**
|
||||
* Represents a color scheme for the code block syntax highlight.
|
||||
@ -30,7 +31,8 @@ interface ColorTheme {
|
||||
* @returns the supported themes, grouped.
|
||||
*/
|
||||
export function listSyntaxHighlightingThemes() {
|
||||
const path = join(getResourceDir(), "styles");
|
||||
const stylesDir = (env.isDev() ? "node_modules/@highlightjs/cdn-assets/styles" : "styles");
|
||||
const path = join(getResourceDir(), stylesDir);
|
||||
const systemThemes = readThemesFromFileSystem(path);
|
||||
|
||||
return {
|
||||
|
Loading…
x
Reference in New Issue
Block a user