diff --git a/apps/server/src/assets/views/share/page.ejs b/apps/server/src/assets/views/share/page.ejs index 84b8b6e60..1556ec2be 100644 --- a/apps/server/src/assets/views/share/page.ejs +++ b/apps/server/src/assets/views/share/page.ejs @@ -12,12 +12,12 @@ <% } else { %> <% } %> - + <% if (!note.isLabelTruthy("shareOmitDefaultCss")) { %> - + <% } %> <% if (note.type === 'text' || note.type === 'book') { %> - + <% } %> <% for (const cssRelation of note.getRelations("shareCss")) { %> diff --git a/apps/server/src/share/routes.ts b/apps/server/src/share/routes.ts index 56b46760f..764860c72 100644 --- a/apps/server/src/share/routes.ts +++ b/apps/server/src/share/routes.ts @@ -14,7 +14,7 @@ import log from "../services/log.js"; import type SNote from "./shaca/entities/snote.js"; import type SBranch from "./shaca/entities/sbranch.js"; import type SAttachment from "./shaca/entities/sattachment.js"; -import utils, { safeExtractMessageAndStackFromError } from "../services/utils.js"; +import utils, { isDev, safeExtractMessageAndStackFromError } from "../services/utils.js"; import options from "../services/options.js"; function getSharedSubTreeRoot(note: SNote): { note?: SNote; branch?: SBranch } { @@ -159,7 +159,16 @@ function register(router: Router) { const { header, content, isEmpty } = contentRenderer.getContent(note); const subRoot = getSharedSubTreeRoot(note); const showLoginInShareTheme = options.getOption("showLoginInShareTheme"); - const opts = { note, header, content, isEmpty, subRoot, assetPath, appPath, showLoginInShareTheme }; + const opts = { + note, + header, + content, + isEmpty, + subRoot, + assetPath: isDev ? assetPath : `../${assetPath}`, + appPath: isDev ? appPath : `../${appPath}`, + showLoginInShareTheme + }; let useDefaultView = true; // Check if the user has their own template