WeKnora
Tencent
Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:AnakinCao/dsh-md-export
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
简体中文:README.zh.md
DSH (DeepSeek Harness) Web plugin — Markdown export extension for dsh-better-sidebar.
Adds an Export button to the Markdown file viewer toolbar in better-sidebar. Click it to open a dropdown with two choices:
.md file into a standalone .html and writes it directly next to the .md file (Markdown tables / code blocks / Mermaid diagrams all inlined; layout follows the original md preview theme — not A4 print-oriented)/sidebar/api/fs.write channel (same basename, .html extension); falls back to a browser download if session detection failsdsh web running@linxin666/dsh-web-ui-all that brings it in)dsh plugin --profile web add <dsh-md-export-0.1.0.tgz>
After installing, restart dsh web (a new bundle needs a host-side reload), then hard-refresh the browser (Cmd/Ctrl+Shift+R).
Open any
.mdfile in the sidebar — the "Export ▾" button appears right next to the "Preview | Edit" toggle.
.md file in better-sidebar (e.g. docs/AOI端保存图片逻辑.md)docs/AOI端保存图片逻辑.html), layout matches the md previewnode --check lib/client.js # syntax check (hand-written single-file client bundle, no build step)
lib/index.js — host-side placeholder plugin (empty apply, so the loader entry mounts)lib/client.js — client logic: MutationObserver watches the markdown toolbar → injects the export button + dropdown → grabs the preview DOM → saves next to the md via /sidebar/api/fs.write / triggers print| Step | How |
|---|---|
| Button injection | MutationObserver watches document.body, finds .nArs4W_editorModeToggle (Markdown/HTML previewer toolbar) and injects when the current file is .md |
| Path resolution | Takes the md absolute path from the .nArs4W_editorPathInput title attribute; the output is the same directory + same basename + .html |
| Session detection | Scans localStorage keys dsh-sidebar:v1:*, picks the newest sessionId |
| Save to same dir | POST /sidebar/api/fs.write (payload: sessionId + absolute path + HTML content); falls back to a browser download on failure |
| HTML layout | Reads colors/fonts from .nArs4W_editorMd and the page theme; exported content width adapts (non-A4) |
| PDF export | Writes the same HTML into a hidden iframe → window.print() → user chooses "Save as PDF" in the print dialog |
.pdf binary directly, so PDF cannot be saved to the md directorynArs4W_ prefix); if a major better-sidebar upgrade changes the class names, this plugin needs a sync update.md files; .markdown extension is also supportedMIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: better-sidebar、markdown、pdf。