https://github.com/onface/handlebars-cn
Handlebars 中文网
https://github.com/onface/handlebars-cn
Last synced: about 2 months ago
JSON representation
Handlebars 中文网
- Host: GitHub
- URL: https://github.com/onface/handlebars-cn
- Owner: onface
- Created: 2015-04-12T17:13:30.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-06-27T09:59:51.000Z (almost 7 years ago)
- Last Synced: 2024-10-28T17:37:43.719Z (7 months ago)
- Language: JavaScript
- Homepage: http://handlebars-cn.onface.live
- Size: 464 KB
- Stars: 19
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.html
Awesome Lists containing this project
README
Handlebars 中文网:轻逻辑语义化的模板引擎
Handlebars 中文网
handlebras 官方文档的中文版
直接提交 issues 报告翻译错误
打开 issues ,填写翻译错误对应的 URL 地址、错误文字、正确文字,原因。
使用 gulp 参与编辑
- Fork 此项目
- 使用 Github Clone 到本地
- 打开命令行/终端
- 跳转至对应目录
- 命令行输入
npm install
- 输入
gulp
回车
- 开始监控
/post/**/*.md
文件修改,当 *.md
文件被修改时,将自动同步 对应的 /**/*.html
文件。
修改完成后使用 github 发送 pull requests
HTML 特殊处理
因为官方英文文档中夹杂着一些带 class 的 <div>
所以通过 replace 做了一个替换。
<!---<div class="bullet">-->
Handlebars 模板看起来很像 HTML ,Handlebars 表达式嵌入在 HTML 中。
html = html.replace(/<!---([^-]+)-->/g,'$1')
可查看 /posts/index.md 的源码以理解 <!---<tag>-->
的用法。