Now it is recommended to use the new version https://github.com/siyuan-note/oceanpress
Convert MarkDown files to html static site
Click here to view the generated effect. The static file is located in gh-pages
The effect of matching hexo
Download the address and just download the binary file and views.zip of the platform you are using.
| platform | Order | Remark |
|---|---|---|
| Windows | .md2website-windows-4.0-amd64.exe 参数 | |
| Linux | .md2website-linux-amd64 参数 | |
| Mac | .md2website-darwin-10.6-amd64 参数 | I haven't tried it because I don't have a mac |
| Source code | go run .src 参数 |
| Parameter name | value | Example |
|---|---|---|
| SourceDir | It's the directory where the notes are located | C:/Users/llej/Documents/SiYuan/data/note |
| OutDir | It's the directory you want to output | D:/code/doc/docHTML |
| viewDir | The previously downloaded view.zip directory after decompression, You can modify the files in it yourself to customize some effects | ./views/ |
| SqlitePath | It is the path to the db file generated by Siyuan | C:/Users/llej/AppData/Local/Temp/siyuan/siyuan.db |
| RssNoOutputHtml | For documents with suffix .rss.xml, do not output the corresponding html | true (default) |
Example:
❯ ./md2website-windows-4.0-amd64.exe -SourceDir C:/Users/llej/Documents/SiYuan/data/note -OutDir D:/code/doc/docHTML -TemplateDir D:/code/oceanpress/src/views -SqlitePath C:/Users/llej/AppData/Local/Temp/siyuan/siyuan.db
# 运行输出
0. === ? 开始转换 ? ===
1. 用户输入
1.1 sourceDir:C: U sers l lej D ocuments S iYuan d ata n ote
1.2 outDir:D: c ode d oc d ocHTML
1.3 viewsDir:D: c ode o ceanpress s rc v iews
1.4 dbPath:C: U sers l lej A ppData L ocal T emp s iyuan s iyuan.db
1.5 AssetsDir:C: U sers l lej D ocuments S iYuan d ata a ssets
2. copy 资源到 outDir
2.1 copy 完成
3. 生成 html
3.1 收集转换生成所需数据
3.2 复制资源文件
3.3 从文件到数据结构转换完毕,开始生成html,共 293 项
[warn] 未找到id 20210104102607-1rhjb41 对应的fileEntity
[warn] 未找到id 20210511124801-bhveys4 对应的fileEntity
----- End -----
The following has not been updated for a long time. Please click this link to view the update history
| Available | Function name | Approximate progress |
|---|---|---|
| ✅ | #6 Dynamic query rendering of content blocks | 80% |
| ❎? | #4 Menu page beautification | 15% |
| ✅? | #2 Embedded block rendering currently does not support circular references | 60% |
| ⭕ | Directory tree | |
| ⭕ | Page header and footer | |
| ⭕ | Block reference current page preview | |
| ⭕ | Block links are available for copy | |
| ⭕ | Bookmark page | |
| ⭕ | Tags | |
| ✅? | #8 Anti-link | 50% |
| ✅? | #1 Block Reference Link | 92% |
| Supports anchor text such as {.text}. Siyuan no longer supports it after 1.2 | 100% | |
| ✅ | #3 Code highlighting and renderings such as mathematical formulas and brain diagrams Click here to view the generated effect. You also need to modify the references of resources such as vditor to local files (it will be said later) | 100% |
You are welcome to submit your website address to me, which I will add to here after review

In this directory is a front-end project using svelte, with the purpose of providing front-end technical support
The main idea of this project is to provide the js file of custom components, and then directly use the tags of custom components in the html template, so that users can replace some of the implementations.
The resources currently generated are:
| js file | describe | volume |
|---|---|---|
| all_components | Contains all components | 266KB |
| block-ref.web_components | Block reference component | 4KB |
| embedded-block.web_components | Embed block components | 5KB |
| md.web_components.js | The document rendering component is a little bit larger because it introduces vditor | 263KB |
All_components.js is introduced by default
go build -o md2website.exe .src
RssNoOutputHtml