Skip to content

Commit 692eea4

Browse files
committed
Improve syntax highlighting
1 parent 4cea9f4 commit 692eea4

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Documentation
22

3-
This documentation is built as a website with [MkDocs](https://www.mkdocs.org/): [torchbox.github.io/django-pattern-library/](https://torchbox.github.io/django-pattern-library/).
3+
This documentation is built as a website with [MkDocs](https://www.mkdocs.org/): [torchbox.github.io/django-pattern-library/](https://torchbox.github.io/django-pattern-library/). The documentation uses non-standard Markdown extensions, and will be best viewed on the website rather than GitHub.
44

55
To build locally, view the project’s `CONTRIBUTING.md`.

docs/getting-started.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ INSTALLED_APPS = [
3535

3636
Also add `pattern_library.loader_tags` to `OPTIONS["builtins"]` into the `TEMPLATES` setting:
3737

38-
```python
38+
```python hl_lines="13 14 15"
3939
TEMPLATES = [
4040
{
4141
"BACKEND": "django.template.backends.django.DjangoTemplates",
@@ -121,7 +121,7 @@ Now let’s look at adding our first template!
121121

122122
Now we’ve done all of the configuration – let’s create a UI component. We’ll use `quote-block` as an example, and place it at `patterns/components/quote_block/quote_block.html` inside one of our Django apps:
123123

124-
```html
124+
```jinja2
125125
<blockquote class="quote-block block--spacing">
126126
<div class="quote-block__text">
127127
<p class="quote-block__quote">{{ quote }}</p>
@@ -136,7 +136,7 @@ Now we’ve done all of the configuration – let’s create a UI component. We
136136

137137
We additionally need to customize a base template, so the standalone component can be rendered within a page with CSS. This is what the `PATTERN_BASE_TEMPLATE_NAME` setting is for. As a separate template in `patterns/base.html`:
138138

139-
```html
139+
```jinja2 hl_lines="11"
140140
<!DOCTYPE html>
141141
<html lang="en">
142142
<head>

docs/guides/customizing-template-rendering.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ All patterns that are not pages are rendered within a base page template. The pa
66

77
You can for example add a theme wrapper around the components:
88

9-
```html
9+
```jinja2
1010
{% block content %}
1111
{% if pattern_library_rendered_pattern %}
1212
<div class="pattern-library bg bg--light">
@@ -18,6 +18,6 @@ You can for example add a theme wrapper around the components:
1818

1919
`pattern_library_rendered_pattern` can also be used to do other modifications on the page for the pattern library only, for example adding an extra class to `<body>`:
2020

21-
```html
21+
```jinja2
2222
<body class="{% block body_class %}{% endblock %}{% if pattern_library_rendered_pattern %} pattern-library-template{% endif %}">
2323
```

docs/reference/examples.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ tags:
4545
4646
## Inclusion tags
4747
48-
```html
48+
```jinja2
4949
<div class="footer__action">
5050
{% footernav %}
5151
</div>
@@ -60,11 +60,11 @@ tags:
6060
6161
## Image lazy load
6262
63-
```html
64-
{% image slide.image fill-100x71 as imageSmall %}
65-
{% image slide.image fill-829x585 as imageLarge %}
63+
```jinja2
64+
{% image slide.image fill-100x71 as imageSmall %}
65+
{% image slide.image fill-829x585 as imageLarge %}
6666

67-
{% include "patterns/atoms/image/image--lazyload.html" with imageSmall=imageSmall width=829 height=585 imageLarge=imageLarge classList='slide__image' %}
67+
{% include "patterns/atoms/image/image--lazyload.html" with imageSmall=imageSmall width=829 height=585 imageLarge=imageLarge classList='slide__image' %}
6868
```
6969

7070
```yaml
@@ -84,7 +84,7 @@ tags:
8484
8585
## Image include
8686
87-
```html
87+
```jinja2
8888
<img src="{{ imageSmall.url }}" data-src="{{ imageLarge.url }}" width="{{ width }}" height="{{ height }}" alt="{{ imageLarge.alt }}" class="{{ classList }} lazyload">
8989
```
9090

0 commit comments

Comments
 (0)