mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-30 03:32:26 +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 { t } from "i18next";
|
||||||
import { join } from "path";
|
import { join } from "path";
|
||||||
import { getResourceDir } from "./utils.js";
|
import { getResourceDir } from "./utils.js";
|
||||||
|
import env from "./env.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a color scheme for the code block syntax highlight.
|
* Represents a color scheme for the code block syntax highlight.
|
||||||
@ -30,7 +31,8 @@ interface ColorTheme {
|
|||||||
* @returns the supported themes, grouped.
|
* @returns the supported themes, grouped.
|
||||||
*/
|
*/
|
||||||
export function listSyntaxHighlightingThemes() {
|
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);
|
const systemThemes = readThemesFromFileSystem(path);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user