Skip to content

Commit 8b30465

Browse files
committed
Bump version to 0.16.0.
1 parent 19f04a7 commit 8b30465

6 files changed

Lines changed: 52 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
1+
# 0.16.0
2+
3+
- Output an error if rendering fails during `record` command
4+
- `include_md` template tag
5+
- `parent` filter
6+
- Serving of `/sitemap.xml` for standalone
7+
- Automatic creation of `sitemap.xml` during `record` command
8+
19
# 0.15.1
210

3-
- include all frontmatter metadata in `directory_contents` template tag output
4-
- parse `date` frontmatter into `datetime`
5-
- parse `draft` frontmatter into `boolean`
11+
- Include all frontmatter metadata in `directory_contents` template tag output
12+
- Parse `date` frontmatter into `datetime`
13+
- Parse `draft` frontmatter into `boolean`
614

715
# 0.15.0
816

917
- [`directory_contents`](templates#coltrane-template-tags) template tag
10-
- add [`django-fastdev`](https://github.com/boxed/django-fastdev) for more immediate feedback when an invalid template variable is used
11-
- show error message if a markdown file cannot be output to HTML
12-
- fix bug where `index.md` files in a sub-directory were not output correctly
18+
- Add [`django-fastdev`](https://github.com/boxed/django-fastdev) for more immediate feedback when an invalid template variable is used
19+
- Show error message if a markdown file cannot be output to HTML
20+
- Fix bug where `index.md` files in a sub-directory were not output correctly
1321

1422
# 0.14.0
1523

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- Can either generate a static HTML site, be deployed as a standalone Django site, or integrated into an existing Django site
1717
- Reads markdown content and renders it in HTML
1818
- Can use data from JSON files in templates and markdown content
19+
- Automatic generation of sitemap.xml
1920
- [Live re-rendering of markdown and data](https://twitter.com/adamghill/status/1487522925393715205) when markdown or JSON data files are saved with the magic of https://github.com/adamchainz/django-browser-reload
2021
- All the power of Django templates, template tags, and filters inside markdown files
2122
- Can include other Django apps for additional functionality

docs/source/common/templates.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,35 @@ If the request url is https://localhost:8000/ and there are these files:
174174
</ul>
175175
```
176176

177+
#### `include_md`
178+
179+
Similar to the [`include`](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#include) template tag, but can be used to include a markdown file and have it render correctly into HTML. It can be used in markdown files or in HTML templates.
180+
181+
```markdown
182+
# include_md
183+
184+
{% include_md '_partial.md' %}
185+
```
186+
187+
```html
188+
<h1>include_md</h1>
189+
190+
{% include_md '_partial.md' %}
191+
```
192+
193+
#### `parent`
194+
195+
A `filter` that returns the parent directory for a particular path. Can be passed a `request` or a `string`.
196+
197+
```html
198+
<!-- request of http://localhost/articles/some-article -->
199+
{{ request|parent }} == '/articles'
200+
```
201+
202+
```html
203+
{{ 'http://localhost/articles/some-article'|parent|parent }} == ''
204+
```
205+
177206
### Humanize template tags
178207

179208
`django.contrib.humanize` [includes a useful template tags](https://docs.djangoproject.com/en/stable/ref/contrib/humanize/) to format numbers and dates in human-friendly ways. Normally it needs to be enabled and loaded in templates manually, but `coltrane` enables it by default so it is available to use in markdown content files automatically.

docs/source/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Can either generate a static HTML site, be deployed as a standalone Django site, or integrated into an existing Django site
88
- Reads markdown content and renders it in HTML
99
- Can use data from JSON files in templates and markdown content
10+
- Automatic generation of sitemap.xml
1011
- [Live re-rendering of markdown and data](https://twitter.com/adamghill/status/1487522925393715205) when markdown or JSON data files are saved with the magic of https://github.com/adamchainz/django-browser-reload
1112
- All the power of Django templates, template tags, and filters inside markdown files
1213
- Can include other Django apps for additional functionality

docs/source/static/cli.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,9 @@ By default `coltrane` will write all files to a directory named `output`. But, t
5656
By default `coltrane` tries to use the optimal number of threads. But, the number of threads to use can be overriden with `--threads`.
5757

5858
`poetry run coltrane record --threads 2`
59+
60+
### Ignore errors
61+
62+
By default `coltrane` will exit with a status code of 1 if there is an error while rendering the markdown into HTML. Those errors can be ignore with `--ignore`.
63+
64+
`poetry run coltrane record --ignore`

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dynamic = ["version", "description"]
55

66
[tool.poetry]
77
name = "coltrane-web"
8-
version = "0.15.1"
8+
version = "0.16.0"
99
description = "A simple content site framework that harnesses the power of Django without the hassle."
1010
authors = ["adamghill <adam@adamghill.com>"]
1111
license = "MIT"

0 commit comments

Comments
 (0)