mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
chore(share): fall back to original EJS rendering mechanism
This commit is contained in:
parent
2827126be7
commit
098cd19b18
@ -240,19 +240,20 @@
|
|||||||
".ejs": "text"
|
".ejs": "text"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"declarationRootDir": "apps/server/src"
|
"declarationRootDir": "apps/server/src",
|
||||||
},
|
"minify": false,
|
||||||
"configurations": {
|
|
||||||
"development": {
|
|
||||||
"minify": false,
|
|
||||||
"assets": [
|
"assets": [
|
||||||
{
|
{
|
||||||
"glob": "**/*",
|
"glob": "**/*",
|
||||||
"input": "apps/server/src/assets",
|
"input": "apps/server/src/assets",
|
||||||
"output": "assets"
|
"output": "assets"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"glob": "**/*",
|
||||||
|
"input": "packages/share-theme/src/templates",
|
||||||
|
"output": "share-theme/templates"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
|
@ -17,7 +17,6 @@ import type SAttachment from "./shaca/entities/sattachment.js";
|
|||||||
import utils, { isDev, safeExtractMessageAndStackFromError } from "../services/utils.js";
|
import utils, { isDev, safeExtractMessageAndStackFromError } from "../services/utils.js";
|
||||||
import options from "../services/options.js";
|
import options from "../services/options.js";
|
||||||
import { t } from "i18next";
|
import { t } from "i18next";
|
||||||
import shareTheme from "@triliumnext/share-theme/templates.js";
|
|
||||||
import ejs from "ejs";
|
import ejs from "ejs";
|
||||||
|
|
||||||
function getSharedSubTreeRoot(note: SNote): { note?: SNote; branch?: SBranch } {
|
function getSharedSubTreeRoot(note: SNote): { note?: SNote; branch?: SBranch } {
|
||||||
@ -211,8 +210,9 @@ function register(router: Router) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (useDefaultView) {
|
if (useDefaultView) {
|
||||||
const result = shareTheme(opts);
|
// Path is relative to apps/server/dist/assets/views
|
||||||
res.send(result);
|
const shareThemePath = "../../share-theme/templates/page.ejs";
|
||||||
|
res.render(shareThemePath, opts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,9 +37,6 @@
|
|||||||
{
|
{
|
||||||
"path": "../../packages/ckeditor5/tsconfig.lib.json"
|
"path": "../../packages/ckeditor5/tsconfig.lib.json"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "../../packages/share-theme"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "../../packages/turndown-plugin-gfm/tsconfig.lib.json"
|
"path": "../../packages/turndown-plugin-gfm/tsconfig.lib.json"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user