mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 04:51:31 +08:00 
			
		
		
		
	fix(share): content.css missing
This commit is contained in:
		
							parent
							
								
									f7471b5a12
								
							
						
					
					
						commit
						255e529714
					
				| @ -1,5 +1,6 @@ | |||||||
| import "./stylesheets/bootstrap.scss"; | import "./stylesheets/bootstrap.scss"; | ||||||
| import "normalize.css"; | import "normalize.css"; | ||||||
|  | import "@triliumnext/ckeditor5/content.css"; | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Fetch note with given ID from backend |  * Fetch note with given ID from backend | ||||||
|  | |||||||
| @ -16,9 +16,6 @@ | |||||||
|     <% if (!note.isLabelTruthy("shareOmitDefaultCss")) { %> |     <% if (!note.isLabelTruthy("shareOmitDefaultCss")) { %> | ||||||
|         <link href="<%= assetPath %>/stylesheets/share.css" rel="stylesheet"> |         <link href="<%= assetPath %>/stylesheets/share.css" rel="stylesheet"> | ||||||
|     <% } %> |     <% } %> | ||||||
|     <% if (note.type === 'text' || note.type === 'book') { %> |  | ||||||
|         <link href="<%= assetPath %>/libraries/ckeditor/ckeditor-content.css" rel="stylesheet"> |  | ||||||
|     <% } %> |  | ||||||
|     <% for (const cssRelation of note.getRelations("shareCss")) { %> |     <% for (const cssRelation of note.getRelations("shareCss")) { %> | ||||||
|         <link href="api/notes/<%= cssRelation.value %>/download" rel="stylesheet"> |         <link href="api/notes/<%= cssRelation.value %>/download" rel="stylesheet"> | ||||||
|     <% } %> |     <% } %> | ||||||
|  | |||||||
| @ -4,7 +4,6 @@ import { fileURLToPath } from "url"; | |||||||
| import express from "express"; | import express from "express"; | ||||||
| import { getResourceDir, isDev } from "../services/utils.js"; | import { getResourceDir, isDev } from "../services/utils.js"; | ||||||
| import type serveStatic from "serve-static"; | 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>>>) => { | const persistentCacheStatic = (root: string, options?: serveStatic.ServeStaticOptions<express.Response<unknown, Record<string, unknown>>>) => { | ||||||
|     if (!isDev) { |     if (!isDev) { | ||||||
| @ -20,8 +19,6 @@ async function register(app: express.Application) { | |||||||
|     const srcRoot = path.join(path.dirname(fileURLToPath(import.meta.url)), ".."); |     const srcRoot = path.join(path.dirname(fileURLToPath(import.meta.url)), ".."); | ||||||
|     const resourceDir = getResourceDir(); |     const resourceDir = getResourceDir(); | ||||||
| 
 | 
 | ||||||
|     app.use(`/${assetPath}/libraries/ckeditor/ckeditor-content.css`, (req, res) => res.contentType("text/css").send(contentCss)); |  | ||||||
| 
 |  | ||||||
|     if (isDev) { |     if (isDev) { | ||||||
|         const publicUrl = process.env.TRILIUM_PUBLIC_SERVER; |         const publicUrl = process.env.TRILIUM_PUBLIC_SERVER; | ||||||
|         if (!publicUrl) { |         if (!publicUrl) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran