跳转至

开源项目与博客资源清单

更新时间:2026-05 · 按「预览服务 / 文件管理 / 前端组件 / MkDocs / 博客」分类


一、独立预览服务

1. kkFileView ⭐ 核心推荐

内容
GitHub https://github.com/kekingcn/kkFileView
官网文档 https://kkview.cn
Stars 12k+ 量级
语言 Java (Spring Boot)
协议 Apache-2.0
部署 Docker / tar.gz 一键包
依赖 LibreOffice(Linux 可脚本安装)
接入文档 https://kkview.cn/zh-cn/docs/usage.html

格式:Office、WPS、PDF、OFD、MD、代码、图片、音视频、ZIP、CAD、3D、XMind、Drawio、EPUB、EML 等(见官方 README)。

典型接入

var url = 'https://git.example.com/user/repo/raw/branch/path/file.docx';
window.open('https://preview.example.com/onlinePreview?url=' + encodeURIComponent(btoa(url)));

2. OnlyOffice Document Server

内容
GitHub https://github.com/ONLYOFFICE/DocumentServer
Docker onlyoffice/documentserver
定位 在线编辑为主,兼预览
协议 AGPL(社区版)
适合 需要协作编辑 docx,非「仅预览」

3. Collabora Online (CODE)

内容
GitHub https://github.com/CollaboraOnline/online
Docker collabora/code
定位 LibreOffice 在线版
协议 MPL-2.0 / 商业双许可
适合 ODF 生态、与 Nextcloud 集成

二、文件管理 + 预览

4. AList

内容
GitHub https://github.com/AlistGo/alist
文档 https://alistgo.com
Stars 49k+
语言 Go + SolidJS
内置预览 PDF、MD、代码、图片、音视频、Office(微软在线)
扩展预览 iframe → kkFileView / OnlyOffice
预览配置 https://alistgo.com/zh/config/preview.html
集成讨论 https://github.com/AlistGo/alist/discussions/3908

5. File Browser

内容
GitHub https://github.com/filebrowser/filebrowser
官网 https://filebrowser.org
Stars 34k+
语言 Go + Vue
预览 基础(图片、文本、PDF 等)
备注 官方维护模式,适合轻量文件管理

6. Gitea(已有)

内容
预览能力 图片、部分文本 raw 浏览
局限 无 Office/PDF 渲染器
用途 附件存储 + raw 下载 URL 供 kkFileView 消费

三、前端预览组件(需二次开发)

7. vue-office

内容
GitHub https://github.com/501351981/vue-office
文档 https://501351981.github.io/vue-office/examples/docs/
Stars ~5.5k
格式 docx, xlsx/xls, pdf, pptx(pptx 部分能力付费)
特点 Vue2/3,支持 URL / ArrayBuffer / Blob
npm install @vue-office/docx @vue-office/excel @vue-office/pdf vue-demi@0.14.6

8. vue-files-preview

内容
GitHub https://github.com/VueFilesPreview/vue-files-preview
Demo https://vuefilespreview.github.io/vue-files-preview/
Stars ~130
格式 docx, xlsx, pptx, pdf, md, 代码, 音视频, epub, msg 等
特点 Vue3 一体化组件,自动识别类型

9. file-preview(React / 跨框架)

内容
GitHub https://github.com/wh131462/file-preview
Demo https://wh131462.github.io/react-file-preview/
格式 图片、视频、音频、PDF、Office、MD、代码
备注 React 为主,同作者有 Vue 绑定

10. @smazeeapps/file-viewer(React)

内容
npm https://www.npmjs.com/package/@smazeeapps/file-viewer
GitHub https://github.com/smazeestudio/edithly-file-viewer
格式 pdf, docx, ppt/pptx, xls/xlsx, csv, md, 图片, 代码
博客 DEV: One Viewer for Every File

11. file-viewer(Vue3 + Naive UI)

内容
GitHub https://github.com/pangju666/file-viewer
Demo https://pangju666.github.io/file-viewer-demo
格式 图片、视频、音频、PDF、Office、3D(glb/obj/stl)、DXF、JSON、MD

四、MkDocs / 静态站插件

12. mkdocs-pdf

内容
GitHub https://github.com/ThomasTNO/mkdocs-pdf
PyPI https://pypi.org/project/mkdocs-pdf/
格式 PDF 内嵌 iframe
用法 ![alt](file.pdf){ type=application/pdf style="min-height:25vh;width:100%" }

13. mkdocs-embed-file

内容
GitHub https://github.com/Enveloppe/mkdocs-embed-file
格式 嵌入 md 片段(wikilink 友好)
局限 不解析 Office

五、博客与社区文章

标题 链接 要点
kkFileView 官方首页 https://kkview.cn/zh-cn/docs/home.html 格式列表、预览截图
kkFileView 接入说明 https://kkview.cn/zh-cn/docs/usage.html Base64 URL、FTP、流式下载
SpringBoot+Vue+kkFileView 文档管理 https://www.cnblogs.com/badaoliumangqizhi/p/16975490.html 上传+预览完整链路
AList + kkFileView 集成 https://github.com/AlistGo/alist/discussions/3908 iframe 配置 JSON
AList Office 预览限制 https://github.com/AlistGo/alist/discussions/594 微软在线预览域名/大小限制
Collabora vs OnlyOffice https://selfhosting.sh/compare/collabora-vs-onlyoffice/ 内存与部署对比
ONLYOFFICE vs LibreOffice Online https://cloud.tencent.com/developer/article/2537544 中文选型参考
vue-office 官方文档 https://501351981.github.io/vue-office/examples/docs/ 前端 Office 接入

六、商业对标(了解即可)

产品 说明
永中 DCS http://dcs.yozosoft.com/
OfficeWeb365 http://www.officeweb365.com/
idocv https://www.idocv.com/

kkFileView README 明确对标以上付费方案,开源可自建。


七、快速选型对照

你的目标 优先看
格式尽可能全、Docker 落地 kkFileView
网盘式浏览 + 预览 AList + kkFileView
笔记站内只看 PDF mkdocs-pdf
自写 Vue 预览页 vue-office / vue-files-preview
在线改 docx(非本次) OnlyOffice / Collabora