diff --git a/README.md b/README.md index 05d5ba0..39bedb0 100644 --- a/README.md +++ b/README.md @@ -70,25 +70,6 @@ cargo install git-cliff cargo generate fan-tastic-z/rust-project-template ``` -### 替换项目名称 - -修改项目目录下`Cargo.toml` 中的package name 为自己的项目名称 - -```toml -[package] -name = "rust-project-template" -``` - -### 替换 cliff 配置 - -替换 `cliff.toml` 配置文件中 下面配置中 replace 的值为自己的仓库地址 - -```toml -postprocessors = [ - { pattern = '\$REPO', replace = "https://github.com/fan-tastic-z/rust-project-template" }, # replace repository URL -] -``` - ### 安装 git hook scripts 在项目目录下执行 diff --git a/cargo-generate.toml b/cargo-generate.toml new file mode 100644 index 0000000..5db310f --- /dev/null +++ b/cargo-generate.toml @@ -0,0 +1,3 @@ +[template] +ignore = ["cargo-generate.toml"] +cargo_generate_version = ">=0.21.0" diff --git a/cliff.toml b/cliff.toml index e79e9de..e00b9d1 100644 --- a/cliff.toml +++ b/cliff.toml @@ -50,7 +50,7 @@ footer = """ trim = true # postprocessors postprocessors = [ - { pattern = '\$REPO', replace = "https://github.com/fan-tastic-z/rust-project-template" }, # replace repository URL + { pattern = '\$REPO', replace = "https://github.com/{{gh-username}}/{{project-name}}" }, # replace repository URL ] [git]