From acde099fda509e1843306e92f9dad93e8a0ac5f4 Mon Sep 17 00:00:00 2001 From: HidegonSan <68275072+HidegonSan@users.noreply.github.com> Date: Thu, 16 Nov 2023 23:19:11 +0900 Subject: [PATCH] format --- archetypes/default.md | 4 ++-- layouts/partials/footer/instant_page.html | 2 +- layouts/partials/head/css/contact_form_css.html | 4 ++-- layouts/partials/head/css/spoiler_css.html | 4 ++-- layouts/partials/head/seo.html | 2 +- layouts/robots.txt | 8 ++++---- layouts/shortcodes/contact_form.html | 2 +- layouts/shortcodes/spoiler.html | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/archetypes/default.md b/archetypes/default.md index 47cd874..2311406 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,10 +1,10 @@ --- draft: true -date: "{{ .Date }}" +date: "{{- .Date -}}" # url: "" -title: "{{ replace .Name "-" " " | title }}" +title: "{{- replace .Name "-" " " | title -}}" description: "" keywords: "" diff --git a/layouts/partials/footer/instant_page.html b/layouts/partials/footer/instant_page.html index 75aa786..a2be75d 100644 --- a/layouts/partials/footer/instant_page.html +++ b/layouts/partials/footer/instant_page.html @@ -1,5 +1,5 @@ {{/* instant.page | Thanks: https://instant.page/ */}} {{- with resources.Get "js/instantpage.js" | fingerprint -}} - + {{- end -}} diff --git a/layouts/partials/head/css/contact_form_css.html b/layouts/partials/head/css/contact_form_css.html index 883917c..8e4eac6 100644 --- a/layouts/partials/head/css/contact_form_css.html +++ b/layouts/partials/head/css/contact_form_css.html @@ -1,9 +1,9 @@ {{/* contact form css */}} -{{ if .HasShortcode "contact_form" }} +{{- if .HasShortcode "contact_form" -}} -{{ end }} +{{- end -}} diff --git a/layouts/partials/head/css/spoiler_css.html b/layouts/partials/head/css/spoiler_css.html index 74aa9c8..5b48932 100644 --- a/layouts/partials/head/css/spoiler_css.html +++ b/layouts/partials/head/css/spoiler_css.html @@ -1,9 +1,9 @@ {{/* spoiler css */}} -{{ if .HasShortcode "spoiler" }} +{{- if .HasShortcode "spoiler" -}} -{{ end }} +{{- end -}} diff --git a/layouts/partials/head/seo.html b/layouts/partials/head/seo.html index 2f9e1b7..3a7c5d3 100644 --- a/layouts/partials/head/seo.html +++ b/layouts/partials/head/seo.html @@ -4,7 +4,7 @@ {{- with site.Params.classification -}} {{- end -}} -{{- end }} +{{- end -}} {{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} {{- with .PublishDate -}} diff --git a/layouts/robots.txt b/layouts/robots.txt index 9304de9..c23f50c 100644 --- a/layouts/robots.txt +++ b/layouts/robots.txt @@ -1,11 +1,11 @@ User-agent: * -{{- if hugo.IsProduction | or (eq site.Params.env "production") }} +{{- if hugo.IsProduction | or (eq site.Params.env "production") -}} Disallow: -{{- else }} +{{- else -}} Disallow: / -{{- end }} +{{- end -}} Disallow: /blog/search/ Disallow: /blog/404.html -Sitemap: {{ "sitemap.xml" | absURL }} +Sitemap: {{- "sitemap.xml" | absURL -}} diff --git a/layouts/shortcodes/contact_form.html b/layouts/shortcodes/contact_form.html index 5bc8941..7b9e103 100644 --- a/layouts/shortcodes/contact_form.html +++ b/layouts/shortcodes/contact_form.html @@ -1,4 +1,4 @@ -{{ .Inner }} +{{- .Inner -}}
diff --git a/layouts/shortcodes/spoiler.html b/layouts/shortcodes/spoiler.html index fb7b340..8ecfeb9 100644 --- a/layouts/shortcodes/spoiler.html +++ b/layouts/shortcodes/spoiler.html @@ -1,2 +1,2 @@ -{{/* https://github.com/gohugoio/hugo/issues/9692 */}} -{{ trim .Inner "\r\n" | .Page.RenderString }} +{{/* https://github.com/gohugoio/hugo/issues/9692 */}} +{{- trim .Inner "\r\n" | .Page.RenderString -}}