Pixiv - Ashima
195 字
1 分钟
导出WordPress文章为Markdown文件
概述
从WordPress转移到Astro时,需要把WordPress导出的XML转换为Markdown文件给Astro使用。
使用
前置准备
- 安装好
Node.js - 使用”All Content”导出的WordPress文件
安装及运行
Tip
如果在导出文件同一目录下运行直接指定名字就好
npx wordpress-export-to-markdown
Need to install the following packages:wordpress-export-to-markdown@3.0.4Ok to proceed? (y) y
Starting wizard...✓ Path to WordPress export file? cedon.WordPress.2026-02-15.xml✓ Put each post into its own folder? Yes✓ Add date prefix to posts? Yes✓ Organize posts into date folders? No✓ Save images? All Images
Parsing...XX normal posts found.XX pages found.XX attached images found.XX images scraped from post body content.
Saving posts...XX posts to save.✓ [post] XXXX✓ [post] XXXX✓ [post] XXXX......Done, got them all!
Saving images...XX images to save.✓ [image] XXXX✓ [image] XXXX✓ [image] XXXX......Done, got them all!
All done!Look for your output files in: /outputReferences
文章分享
如果这篇文章对你有帮助,欢迎分享给更多人!
导出WordPress文章为Markdown文件
https://blog.cedon.cn/posts/practical-tools/export-wordpress-posts-to-md/ 最后更新于 2026-02-15,距今已过 66 天
部分内容可能已过时