Conversation
新增 `npm run export:obsidian` 脚本,将本书从 Nextra/MDX 导出为本地 Markdown vault,方便在 Obsidian 中离线浏览。 - 生成总目录、章节分组与每页的上一页/总目录/下一页导航 - 复制图片资源并将站内链接、HTML/Markdown 图片改写为本地相对路径 - 输出目录 obsidian-vault/ 为生成产物,已加入 .gitignore Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@Jiaweeee is attempting to deploy a commit to the Podwise Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
这个 PR 做了什么
新增
npm run export:obsidian脚本,将本书从 Nextra/MDX 一键导出为本地 Markdown vault,方便在 Obsidian 中离线浏览。改动内容
scripts/export-obsidian.mjs:核心导出脚本,无第三方依赖(纯 Node.js)_meta.json收集各章节页面,生成总目录与章节分组public/attachments/图片资源,并将站内链接、HTML/Markdown 图片改写为本地相对路径package.json:新增export:obsidianscriptREADME.md:补充导出说明.gitignore:忽略生成产物obsidian-vault/使用方式
生成结果位于
obsidian-vault/,用 Obsidian 打开该目录即可离线浏览,入口文件为硬地骇客 - 目录.md。测试
本地运行成功,导出 25 个页面,图片与站内链接均正确改写为相对路径。
🤖 Generated with Claude Code