https://github.com/hexojs/hexo-renderer-nunjucks
Add support for Nunjucks templates to Hexo websites
https://github.com/hexojs/hexo-renderer-nunjucks
hexo-plugin nunjucks nunjucks-templates
Last synced: 9 months ago
JSON representation
Add support for Nunjucks templates to Hexo websites
- Host: GitHub
- URL: https://github.com/hexojs/hexo-renderer-nunjucks
- Owner: hexojs
- License: mit
- Archived: true
- Created: 2020-01-17T12:02:30.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-20T21:34:36.000Z (about 3 years ago)
- Last Synced: 2024-09-22T12:31:42.752Z (almost 2 years ago)
- Topics: hexo-plugin, nunjucks, nunjucks-templates
- Language: JavaScript
- Size: 288 KB
- Stars: 3
- Watchers: 5
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# hexo-renderer-nunjucks
[](https://travis-ci.com/hexojs/hexo-renderer-nunjucks) [](http://badge.fury.io/js/hexo-renderer-nunjucks) [](https://coveralls.io/r/hexojs/hexo-renderer-nunjucks?branch=master)
Add support for [Nunjucks] templates to [Hexo] websites.
All template files suffixed with `.njk` or `.j2` ([Jinja2]) will be converted
to HTML pages.
## Installation
**Note**: this module is installed by default since `hexo@5.x`.
For other [Hexo] versions, run the following command in an Hexo project folder of yours.
``` bash
$ npm install hexo-renderer-nunjucks
```
## Development
### Testing
Tests and code coverage are generated when running the following command.
```bash
npm test
```
Pull Requests will be checked automatically with [Coveralls]. Their bot
will comment about the coverage change as a comment to the code change.
### Releasing a new version
A bug fix and non-breaking code release can be created with the following commands:
```bash
npm version patch
git push && git push --tags
```
Read [`npm version` documentation](https://docs.npmjs.com/cli/version)
to learn more about other companion commands,
such as `npm version major` (breaking change)
and `npm version minor` (features, new stuff), amongst others.
### Publishing on npm
This package is automatically published on npm as
[`hexo-renderer-nunjucks`][npm-pkg] for every new Git tag.
Two secrets environment variables need to be setup in [Travis CI Repo Settings](https://travis-ci.com/hexojs/hexo-renderer-nunjucks/settings) :
| | Description
| --- | ---
| `NPM_USER_EMAIL` | Email of the npm user account with _write access_ to [`hexo-renderer-nunjucks`][npm-pkg].
| `NPM_API_KEY` | API Token associated to the aforementioned user.
[Nunjucks]: https://mozilla.github.io/nunjucks/
[Jinja2]: https://palletsprojects.com/p/jinja/
[Hexo]: https://hexo.io/
[npm-pkg]: https://npmjs.com/hexo-renderer-nunjucks
[Coveralls]: https://coveralls.io/github/hexojs/hexo-renderer-nunjucks