Skip to content

Commit 24a5715

Browse files
committed
Add README links
1 parent c9f45ef commit 24a5715

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ Documentation is available at [torchbox.github.io/django-pattern-library/](https
3131

3232
- [Getting started](https://torchbox.github.io/django-pattern-library/getting-started/)
3333
- Guides
34+
- [Defining template context](https://torchbox.github.io/django-pattern-library/guides/defining-template-context/)
35+
- [Overriding template tags](https://torchbox.github.io/django-pattern-library/guides/overriding-template-tags/)
36+
- [Customizing template rendering](https://torchbox.github.io/django-pattern-library/guides/customizing-template-rendering/)
37+
- [Workflows that work](https://torchbox.github.io/django-pattern-library/guides/workflows-that-work/)
3438
- Reference
39+
- [API & settings](https://torchbox.github.io/django-pattern-library/reference/api/)
40+
- [Known issues and limitations](https://torchbox.github.io/django-pattern-library/reference/known-issues/)
3541

3642
## Contributing
3743

docs/guides/overriding-template-tags.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,22 @@ The override process has two parts:
1313
1. Override your template tag with a mock implementation
1414
2. Define fake result for your tag in a YAML file
1515

16+
## Providing a default value for template tags
1617

17-
### Providing a default value for template tags
1818
To provide a default for a template tag, you need to provide a keyword argument default_html when overriding your tag.
1919

20-
```
20+
```python
2121
from pattern_library.monkey_utils import override_tag
2222

23-
override_tag(register, 'a_tag_name', default_html="https://potato.com")
23+
override_tag(register, 'a_tag_name', default_html="https://example.com/")
2424
```
2525

2626
This default is used for any tag that's not passed its own context, allowing specificity for those elements that need it while preventing the tag from breaking when it's not structural to the component.
2727

28-
#### Limitation
29-
Currently this feature only supports providing a default for the output of the tag, this does not support modifying context in templates such as {% an_example_tag page.url as example_variable %}.
28+
### Limitation
29+
30+
Currently this feature only supports providing a default for the output of the tag, this does not support modifying context in templates such as `{% an_example_tag page.url as example_variable %}`.
31+
3032
### When do I need to override a template tag?
3133

3234
Ideally your pattern library should be independent, so it doesn't fail when
@@ -252,4 +254,3 @@ tags:
252254
```
253255

254256
Note the `target_var` field.
255-

docs/reference/known-issues.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Known issues
1+
# Known issues and limitations
22

33
django-pattern-library has a few known limitations due to its design, which are worth knowing about when authoring templates or attempting to document them in the pattern library.
44

0 commit comments

Comments
 (0)