Abyssers / blog

Abyssers' Blog
https://abyssers.github.io/blog/
Apache License 2.0
3 stars 4 forks source link

After-hook Scripts for Hexo #53

Open Morilence opened 1 year ago

Morilence commented 1 year ago

预期交付:

熟悉 Title 中提到的 hexo 命令,利用 commander、gray-matter 库以及 scripts 中已封装的工具函数等解析当前脚本的调用归属,并规范处理对应 hexo 命令的执行结果(处理规范请见负责人 @GarlicGo 下发的子 issues)。

GarlicGo commented 1 year ago

这三个脚本的初步功能预期可以简要介绍一下吗?

Morilence commented 1 year ago

@GarlicGo 这个预期规范就是让你制定来着,可以参考:(以下均为假想实现:具体还得按照各命令的实际效果与可能会出现的分支情况来定): posts.afternew.js:1. 在 hexo new 后转移其所创建的文件&文件夹到相应的年/月/日文件夹下;2. 通用化:整理所有不符规范的文档及其资源文件夹 scripts/drafts.afternew.js:drafts 组织形式与 posts 保持一致 scripts/drafts.afterpublish.js:将发布到 _posts 中的文章亦按照时间分类目录整理