docnest 0.1.19 → 0.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -69,6 +69,8 @@ export default defineConfig({
69
69
  搜索框为空时显示最近搜索:仅记录有结果的关键词,去重后保留最近 10 条,点击即可再次搜索。
70
70
  历史保存在当前浏览器,按 `site.storageKeyPrefix` 隔离;不上传服务器。
71
71
 
72
+ 多空间托管场景可设置 `DOCS_ALLOW_RAW_HTML=false`,把 Markdown 中的原始 HTML 显示为文本,避免文档内脚本取得宿主页面权限;Markdown 语法与 Mermaid 不受影响。默认保留原始 HTML 兼容行为。
73
+
72
74
  PDF、页面水印和图表外带能力由一个开关统一控制,默认使用普通阅读模式:
73
75
 
74
76
  ```js
package/dist/server.js CHANGED
@@ -184,7 +184,7 @@ async function storageReadAsset(assetPath) {
184
184
  }
185
185
  // 配置 markdown-it
186
186
  const md = new MarkdownIt({
187
- html: true,
187
+ html: process.env.DOCS_ALLOW_RAW_HTML !== 'false',
188
188
  linkify: true,
189
189
  typographer: true,
190
190
  highlight: function (str, lang) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docnest",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "可复用的本地 Markdown 文档中心",
5
5
  "repository": {
6
6
  "type": "git",