mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 17:26:38 +01:00
Merge remote-tracking branch 'origin/master' into next60
# Conflicts: # src/routes/api/options.js # src/services/import/zip.js # src/services/options_init.js
This commit is contained in:
@@ -318,6 +318,7 @@ async function exportToZip(taskContext, branch, format, res, setHeaders = true)
|
||||
if (noteMeta.format === 'html') {
|
||||
if (!content.substr(0, 100).toLowerCase().includes("<html")) {
|
||||
const cssUrl = `${"../".repeat(noteMeta.notePath.length - 1)}style.css`;
|
||||
const htmlTitle = utils.escapeHtml(title);
|
||||
|
||||
// <base> element will make sure external links are openable - https://github.com/zadam/trilium/issues/1289#issuecomment-704066809
|
||||
content = `<html>
|
||||
@@ -326,10 +327,11 @@ async function exportToZip(taskContext, branch, format, res, setHeaders = true)
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="${cssUrl}">
|
||||
<base target="_parent">
|
||||
<title data-trilium-title>${htmlTitle}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<h1>${utils.escapeHtml(title)}</h1>
|
||||
<h1 data-trilium-h1>${htmlTitle}</h1>
|
||||
|
||||
<div class="ck-content">${content}</div>
|
||||
</div>
|
||||
@@ -504,7 +506,7 @@ ${markdownContent}`;
|
||||
const rootMeta = createNoteMeta(branch, { notePath: [] }, existingFileNames);
|
||||
|
||||
const metaFile = {
|
||||
formatVersion: 1,
|
||||
formatVersion: 2,
|
||||
appVersion: packageInfo.version,
|
||||
files: [ rootMeta ]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user