Okf to book

From yzfly/awesome-okf · View interactive version

Okf to book is an AI agent skill from the GitHub repository yzfly/awesome-okf. 把符合 OKF v0.2 的知识包或项目发布为可视化的文档站(VitePress, Vue 系, 亮色主题), 带侧边栏导航与概念互链. 适用场景包括把一个 OKF bundle 变成可浏览的网站或电子书, 为知识库生成文档门户, 把任意 OKF 项目发布为静态站点. 当用户提到把 OKF 发布成文档站, OKF 转网站或电子书, 可视化知识库, 或为 bundle 生成 docs 站时触发.

How to use this skill

Skill file

OKF to Book

把任意符合 OKF v0.2 的知识包,发布为可视化文档站(像一本可浏览的书)。默认用 VitePress(Vue 系)+ 亮色主题(不启用暗色)。

何时使用

工作流

  1. 确保是合规 bundle:先跑 ../okf-creator/scripts/validate_okf.py <bundle>,修到 0 错误。
  2. 生成站点:

```bash

python scripts/okf_to_vitepress.py <bundle 目录> -o ./site --title "我的知识库"

```

  1. 预览/构建:

```bash

cd ./site && npm install && npm run docs:dev # 本地预览

npm run docs:build # 产出静态站点 docs/.vitepress/dist

```

  1. 部署:把 docs/.vitepress/dist 丢到任意静态托管(GitHub Pages / Vercel / Cloudflare Pages)。

设计取舍

进阶(可按需扩展生成器)

反向关系

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.