mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2025-10-09 18:21:15 +00:00
Update to Hugo v0.143.1
This commit is contained in:
parent
615e03bca3
commit
525b28e98b
13 changed files with 36 additions and 49 deletions
|
@ -1,6 +1,15 @@
|
|||
{{ $toot_reference := .Get 0 }}
|
||||
{{ $url := printf "static/data/toots/%s.json" $toot_reference }}
|
||||
{{ $dataJ := getJSON $url }}
|
||||
|
||||
{{ $url := printf "data/toots/%s.json" $toot_reference }}
|
||||
{{ $dataJ := dict }}
|
||||
{{ with try (resources.Get $url) }}
|
||||
{{ with .Err }}
|
||||
{{ errorf "Unable to get resource %s: %s" $url . }}
|
||||
{{ else with .Value }}
|
||||
{{ $dataJ = . | transform.Unmarshal }}
|
||||
{{ else }}
|
||||
{{ errorf "Unable to get resource %s" $url }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
w
|
||||
{{ .Scratch.Set "toot" $dataJ }}
|
||||
{{ partial "external/toot.html" . }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue