Add `issue` shortcodes

pull/2/head
Folyd 3 years ago
parent 7c82a298a0
commit f0946312cb

@ -20,4 +20,5 @@ juice_logo_name = "Juice"
juice_logo_path = "juice.svg"
juice_extra_menu = [
{ title = "Github", link = "https://github.com/huhu/juice" }
]
]
repository_url = "https://github.com/huhu/juice"

@ -98,8 +98,17 @@ juice_logo_path = "juice.svg"
juice_extra_menu = [
{ title = "Github", link = "https://github.com/huhu/juice"}
]
repository_url = "https://github.com/huhu/juice"
```
# Shortcodes
**Juice** have some builtin shortcodes available in `templates/shortcodes` directory.
- `issue(id)` - A shortcode to render issue url, e.g. `issue(id=1)` would render to the link `https://github.com/huhu/juice/issue/1`.
> The `repository_url` is required.
# Showcases
Please see the [showcases page](/showcases).

@ -0,0 +1 @@
<a href="{{ config.extra.repository_url }}/issues/{{ id }}">#{{ id }}</a>
Loading…
Cancel
Save