Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matsuyoshi30/harbor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasaya Watanabe <sfbgwm30@gmail.com>2021-10-17 11:02:14 +0300
committerGitHub <noreply@github.com>2021-10-17 11:02:14 +0300
commit52d9f1bb537d96fa9ebe5416a7067464308078c2 (patch)
tree81745dc7774ab81c0f08db807f4899f73b6e6c12
parentc7f1e57ec1505486bfc4f8f2e92623561d6e9281 (diff)
parent13ac791b25a923e5d979b3a922cdb987fa103e52 (diff)
Merge pull request #121 from matsuyoshi30/fix-list.json
Fix list.json for not generating invalid JSON
-rw-r--r--layouts/_default/list.json5
1 files changed, 3 insertions, 2 deletions
diff --git a/layouts/_default/list.json b/layouts/_default/list.json
index 6c434ef..65d080a 100644
--- a/layouts/_default/list.json
+++ b/layouts/_default/list.json
@@ -1,6 +1,7 @@
[
- {{ range $index, $page := .Pages }}{{ if ne $index 0 }},{{ end }}
+ {{ range $index, $page := .Pages }}
{{ if eq .Type "post" }}
+ {{ if ne $index 0 }},{{ end }}
{
"ref": "{{ $page.Permalink }}",
"title": {{ $page.Title | jsonify }},
@@ -10,4 +11,4 @@
}
{{ end }}
{{ end }}
-] \ No newline at end of file
+]