mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-27 07:21:32 +08:00
fix(export/zip): stylesheet not embedded due to wrong path
This commit is contained in:
parent
6c2e5a1cc4
commit
6e46ab0598
@ -6,7 +6,7 @@ import path from "path";
|
|||||||
import mimeTypes from "mime-types";
|
import mimeTypes from "mime-types";
|
||||||
import mdService from "./markdown.js";
|
import mdService from "./markdown.js";
|
||||||
import packageInfo from "../../../package.json" with { type: "json" };
|
import packageInfo from "../../../package.json" with { type: "json" };
|
||||||
import { getContentDisposition, escapeHtml } from "../utils.js";
|
import { getContentDisposition, escapeHtml, getResourceDir } from "../utils.js";
|
||||||
import protectedSessionService from "../protected_session.js";
|
import protectedSessionService from "../protected_session.js";
|
||||||
import sanitize from "sanitize-filename";
|
import sanitize from "sanitize-filename";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
@ -20,7 +20,6 @@ import type AttachmentMeta from "../meta/attachment_meta.js";
|
|||||||
import type AttributeMeta from "../meta/attribute_meta.js";
|
import type AttributeMeta from "../meta/attribute_meta.js";
|
||||||
import type BBranch from "../../becca/entities/bbranch.js";
|
import type BBranch from "../../becca/entities/bbranch.js";
|
||||||
import type { Response } from "express";
|
import type { Response } from "express";
|
||||||
import { RESOURCE_DIR } from "../resource_dir.js";
|
|
||||||
import type { NoteMetaFile } from "../meta/note_meta.js";
|
import type { NoteMetaFile } from "../meta/note_meta.js";
|
||||||
|
|
||||||
type RewriteLinksFn = (content: string, noteMeta: NoteMeta) => string;
|
type RewriteLinksFn = (content: string, noteMeta: NoteMeta) => string;
|
||||||
@ -512,7 +511,7 @@ ${markdownContent}`;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const cssContent = fs.readFileSync(`${RESOURCE_DIR}/libraries/ckeditor/ckeditor-content.css`);
|
const cssContent = fs.readFileSync(`${getResourceDir()}/public/libraries/ckeditor/ckeditor-content.css`);
|
||||||
|
|
||||||
archive.append(cssContent, { name: cssMeta.dataFileName });
|
archive.append(cssContent, { name: cssMeta.dataFileName });
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user