more updates to children shortcode
parent
e2581d0ba3
commit
eb8fcbfdfa
|
@ -73,6 +73,7 @@ related: # Creates links to specific internal and external content at the bottom
|
||||||
- /path/to/related/article
|
- /path/to/related/article
|
||||||
- https://external-link.com, This is an external link
|
- https://external-link.com, This is an external link
|
||||||
external_url: # Used in children shortcode type="list" for page links that are external
|
external_url: # Used in children shortcode type="list" for page links that are external
|
||||||
|
list_image: # Image included with article descriptions in children type="articles" shortcode
|
||||||
list_note: # Used in children shortcode type="list" to add a small note next to listed links
|
list_note: # Used in children shortcode type="list" to add a small note next to listed links
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -413,7 +414,8 @@ The following table shows which children types use which frontmatter properties:
|
||||||
|:----------- |:--------:|:----:|:---------:|
|
|:----------- |:--------:|:----:|:---------:|
|
||||||
| `list_title` | ✓ | ✓ | ✓ |
|
| `list_title` | ✓ | ✓ | ✓ |
|
||||||
| `description` | ✓ | | |
|
| `description` | ✓ | | |
|
||||||
| `external_url` | | ✓ | |
|
| `external_url` | ✓ | ✓ | |
|
||||||
|
| `list_image` | ✓ | | |
|
||||||
| `list_note` | | ✓ | |
|
| `list_note` | | ✓ | |
|
||||||
|
|
||||||
### Inline icons
|
### Inline icons
|
||||||
|
|
|
@ -15,7 +15,10 @@
|
||||||
{{ if eq $type "articles" }}
|
{{ if eq $type "articles" }}
|
||||||
|
|
||||||
{{ range $pages.ByWeight }}
|
{{ range $pages.ByWeight }}
|
||||||
<h3><a href="{{ .RelPermalink }}" >{{ if .Params.list_title }}{{ .Params.list_title }}{{ else }}{{ .Title }}{{ end }}</a></h3>
|
{{ $title := cond ( isset .Params "list_title" ) .Params.list_title .Title }}
|
||||||
|
{{ $url := cond ( isset .Params "external_url" ) .Params.external_url .RelPermalink }}
|
||||||
|
{{ $target := cond ( isset .Params "external_url" ) "_blank" "" }}
|
||||||
|
<h3><a href="{{ $url }}" target="{{ $target }}">{{ $title }}</a></h3>
|
||||||
<p>
|
<p>
|
||||||
{{- if .Description }}{{- .Description | markdownify -}}
|
{{- if .Description }}{{- .Description | markdownify -}}
|
||||||
{{ else }}{{- .Summary | markdownify -}}
|
{{ else }}{{- .Summary | markdownify -}}
|
||||||
|
@ -51,7 +54,7 @@
|
||||||
{{ $url := cond ( isset .Params "external_url" ) .Params.external_url .RelPermalink }}
|
{{ $url := cond ( isset .Params "external_url" ) .Params.external_url .RelPermalink }}
|
||||||
{{ $target := cond ( isset .Params "external_url" ) "_blank" "" }}
|
{{ $target := cond ( isset .Params "external_url" ) "_blank" "" }}
|
||||||
{{ $note := cond ( isset .Params "list_note" ) (print "<span class='list-note'>" .Params.list_note "</span>") "" }}
|
{{ $note := cond ( isset .Params "list_note" ) (print "<span class='list-note'>" .Params.list_note "</span>") "" }}
|
||||||
<li><a href="{{ $url }}">{{ $title }}</a> {{ $note | markdownify }}</li>
|
<li><a href="{{ $url }}" target="{{ $target }}">{{ $title }}</a> {{ $note | markdownify }}</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue