Skip to content

Latest commit

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

hexo-replace

一个用来替换hexo相关文件中文本的工具

使用

你可以用它很快速的替换文本如:

hexo replace 张三 李四

在不加任何参数的情况下默认扫描sourcetheme下的文件,即-g 你也可以添加-r参数来自定义扫描路径,它可以是正则表达式(regular expression)、函数、或是一种类似于Express 的路径字符串,例如:

posts/:id => posts/89 posts/*path => posts/2015/title

更多参考util.Pattern

$ hexo replace -h
Usage: hexo replace <source><replace>
Description:
Text substitution tool
Arguments:
replace New string
source Original string
Options:
-g, --global Global match string
-r, --rule You can use a regular expression, a functionor an Express-style pattern string.

TODO

  1. 替换记录备份
  2. 开放扩展接口

Lisense

MIT

About

Hexo的文本替换工具 Text replacement tool of hexo.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages