-
-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
希望可以批量转换html写法的文件 #32
Comments
HTML Editor - LDDGO.NET 你已经安装了turndown和moment库。 下面是代码,支持直接html文件批量生成md文件,调用的库是turndown 和 moment 库 (moment 库用来解析html的正则和替换) const fs = require('fs'); // 创建 Turndown 服务实例 // 设置HTML文件和Hexo _posts目录的路径 // 读取HTML文件目录中的所有文件 files.forEach(file => { // 使用 Turndown 将HTML转换为Markdown // 创建文章的Front-matter // 创建完整的Markdown内容 // 写入到Hexo的_posts目录 hljs.highlightAll(); |
Feature request(新功能建议)
希望可以批量转换html写法的文件
The text was updated successfully, but these errors were encountered: