Skip to content

Build your personal knowledge base with Trilium Notes

chore(server): get printing template in order

Elian Dorane83eacb18b1e
diff --git a/apps/client/src/print.ts b/apps/client/src/print.ts
new file mode 100644
index 0000000000..b03df2c430
--- /dev/null
+++ b/apps/client/src/print.ts
@@ -0,0 +1 @@
+console.log("Print script is here.");
diff --git a/apps/client/vite.config.mts b/apps/client/vite.config.mts
index 04a5b09118..3dd52b6b9b 100644
--- a/apps/client/vite.config.mts
+++ b/apps/client/vite.config.mts
@@ -76,7 +76,8 @@ export default defineConfig(() => ({
setup: join(__dirname, "src", "setup.ts"),
share: join(__dirname, "src", "share.ts"),
set_password: join(__dirname, "src", "set_password.ts"),
- runtime: join(__dirname, "src", "runtime.ts")
+ runtime: join(__dirname, "src", "runtime.ts"),
+ print: join(__dirname, "src", "print.ts")
},
output: {
entryFileNames: "src/[name].js",
diff --git a/apps/server/src/assets/views/print.ejs b/apps/server/src/assets/views/print.ejs
index 2ed13581f9..7e39b95670 100644
--- a/apps/server/src/assets/views/print.ejs
+++ b/apps/server/src/assets/views/print.ejs
@@ -6,9 +6,9 @@
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover" />
- <link rel="manifest" crossorigin="use-credentials" href="manifest.webmanifest">
+ <link rel="manifest" crossorigin="use-credentials" href="../manifest.webmanifest">
<title>Trilium Notes</title>
- <script src="<%= appPath %>/runtime.js" crossorigin type="module"></script>
+ <script src="../<%= appPath %>/runtime.js" crossorigin type="module"></script>
</head>
<body
id="trilium-print"
@@ -24,7 +24,7 @@
<!-- Required for correct loading of scripts in Electron -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
-<script src="<%= appPath %>/print.js" crossorigin type="module"></script>
+<script src="../<%= appPath %>/print.js" crossorigin type="module"></script>
</body>
</html>