Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from mikhail-akimov/Issue-6
Converting README.rst to README.md and fixing pyproject.toml
- Loading branch information
Showing
3 changed files
with
40 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Jinja2 extension to handle git-specific things | ||
|
||
[![Travis](https://travis-ci.org/sobolevn/jinja2-git.svg?branch=master)](https://travis-ci.org/sobolevn/jinja2-git) | ||
[![Coveralls](https://coveralls.io/repos/github/sobolevn/jinja2-git/badge.svg?branch=master)](https://coveralls.io/github/sobolevn/jinja2-git?branch=master) | ||
[![PyPI version](https://badge.fury.io/py/jinja2-git.svg)](http://badge.fury.io/py/jinja2-git) | ||
[![Dependencies Status](https://img.shields.io/pypi/pyversions/jinja2-git.svg)](https://pypi.python.org/pypi/jinja2-git) | ||
|
||
## Reasoning | ||
--------- | ||
|
||
This plugin is used to render commit hash in `jinja2` templates. We are | ||
using it to render our template version in `cookicutter`: | ||
|
||
- [wemake-django-template](https://github.com/wemake-services/wemake-django-template) | ||
- [wemake-vue-template](https://github.com/wemake-services/wemake-vue-template) | ||
|
||
## Usage | ||
----- | ||
|
||
Add it as an extension for | ||
[jinja2](http://jinja.pocoo.org/docs/2.10/extensions/) or | ||
[cookiecutter](http://cookiecutter.readthedocs.io/en/latest/advanced/template_extensions.html). | ||
|
||
And then inside a template: | ||
|
||
```python | ||
from jinja2 import Environment | ||
|
||
env = Environment(extensions=['jinja2_git.GitExtension']) | ||
template = env.from_string('Commit is: {% gitcommit %}') | ||
# => Commit is: c644682f4899d7e98147ce3a61a11bb13c52b3a0 | ||
``` | ||
|
||
## Installation | ||
------------ | ||
|
||
```bash | ||
$ pip install jinja2-git | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters