expose as a helper to be used from templates
This commit is contained in:
parent
a144d00ed0
commit
9295e5f7ff
2 changed files with 37 additions and 17 deletions
12
README.md
12
README.md
|
@ -1,6 +1,6 @@
|
|||
# hexo-filter-github-emojis
|
||||
|
||||
[](https://npmjs.org/package/hexo-filter-github-emojis)
|
||||
[](https://npmjs.org/package/hexo-filter-github-emojis)
|
||||
[](https://npmjs.org/package/hexo-filter-github-emojis)
|
||||
[](https://npmjs.org/package/hexo-filter-github-emojis)
|
||||
[](https://npmjs.org/package/hexo-filter-github-emojis)
|
||||
|
@ -60,7 +60,7 @@ The filter will try to download the latest version of [Github Emojis][ghemojis]
|
|||
- **localEmojis** - You can specify your own list. An object or JSON string is valid. The filter will first check the `localEmojis` then fallback to the [Github Emojis][ghemojis] list.
|
||||
|
||||
For example:
|
||||
|
||||
|
||||
```yaml
|
||||
githubEmojis:
|
||||
localEmojis:
|
||||
|
@ -79,4 +79,12 @@ The filter will try to download the latest version of [Github Emojis][ghemojis]
|
|||
arrow_right: https://path/to/arrow_right.png
|
||||
```
|
||||
|
||||
## Helper
|
||||
|
||||
You can also render a GitHub emoji from a template using the `github_emoji` helper:
|
||||
|
||||
```html
|
||||
<h1><% github_emoji('octocat') %></h1>
|
||||
```
|
||||
|
||||
[ghemojis]: https://api.github.com/emojis
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue