mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 01:35:56 +01:00
Add tags JSON
This commit is contained in:
parent
2e2f0b0f64
commit
f60d372d5a
3 changed files with 13 additions and 1 deletions
7
content/tags/_index.md
Normal file
7
content/tags/_index.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
outputs:
|
||||
- html
|
||||
- json
|
||||
- gemini
|
||||
- rss
|
||||
---
|
|
@ -23,7 +23,7 @@
|
|||
<ul class="posts-list">
|
||||
{{ range .Pages }}
|
||||
<li class="post-item">
|
||||
<a href="{{.RelPermalink}}">
|
||||
<a href="{{.RelPermalink}}{{ if hasPrefix .RelPermalink "/tags/" }}#{{ end }}">
|
||||
{{ if .Params.emoji }}<span class="post-emoji">{{ .Params.emoji }}</span>{{ end }}
|
||||
<span class="post-title">{{ partial "page-title.txt" . }}</span>
|
||||
<span class="post-day">
|
||||
|
|
5
layouts/_default/list.json
Normal file
5
layouts/_default/list.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{- $.Scratch.Add "index" slice -}}
|
||||
{{- range $index, $element := .Data.Pages.ByTitle -}}
|
||||
{{- $.Scratch.Add "index" $element.Name -}}
|
||||
{{- end -}}
|
||||
{{- $.Scratch.Get "index" | jsonify -}}
|
Loading…
Reference in a new issue