|
|
|
|
@ -4,7 +4,6 @@ import { fileURLToPath } from "url";
|
|
|
|
|
import express from "express";
|
|
|
|
|
import { getResourceDir, isDev } from "../services/utils.js";
|
|
|
|
|
import type serveStatic from "serve-static";
|
|
|
|
|
import contentCss from "@triliumnext/ckeditor5/content.css";
|
|
|
|
|
|
|
|
|
|
const persistentCacheStatic = (root: string, options?: serveStatic.ServeStaticOptions<express.Response<unknown, Record<string, unknown>>>) => {
|
|
|
|
|
if (!isDev) {
|
|
|
|
|
@ -20,8 +19,6 @@ async function register(app: express.Application) {
|
|
|
|
|
const srcRoot = path.join(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
|
|
|
const resourceDir = getResourceDir();
|
|
|
|
|
|
|
|
|
|
app.use(`/${assetPath}/libraries/ckeditor/ckeditor-content.css`, (req, res) => res.contentType("text/css").send(contentCss));
|
|
|
|
|
|
|
|
|
|
if (isDev) {
|
|
|
|
|
const publicUrl = process.env.TRILIUM_PUBLIC_SERVER;
|
|
|
|
|
if (!publicUrl) {
|
|
|
|
|
|