feat(config): add .Params.widgets.archive.path
This commit is contained in:
parent
06c724c141
commit
e728263d13
@ -21,6 +21,8 @@ title = "Example Site"
|
|||||||
enabled = ['archive', 'tag-cloud']
|
enabled = ['archive', 'tag-cloud']
|
||||||
[params.widgets.archive]
|
[params.widgets.archive]
|
||||||
limit = 5
|
limit = 5
|
||||||
|
### Archive page relative URL
|
||||||
|
path = "archive"
|
||||||
[params.widgets.tagCloud]
|
[params.widgets.tagCloud]
|
||||||
limit = 10
|
limit = 10
|
||||||
[params.opengraph]
|
[params.opengraph]
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
{{ range first .Site.Params.widgets.archive.limit ($archive) }}
|
{{ range first .Site.Params.widgets.archive.limit ($archive) }}
|
||||||
{{ $id := lower (replace .Key " " "-") }}
|
{{ $id := lower (replace .Key " " "-") }}
|
||||||
<div class="archive-year">
|
<div class="archive-year">
|
||||||
<a href="{{ $.Site.BaseURL }}/archive#{{ $id }}">
|
<a href="{{ $.Site.BaseURL }}{{ $.Site.Params.widgets.archive.path }}#{{ $id }}">
|
||||||
<span class="year">{{ .Key }}</span>
|
<span class="year">{{ .Key }}</span>
|
||||||
<span class="count">{{ len .Pages }}</span>
|
<span class="count">{{ len .Pages }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user