-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d2ad221
commit b4152d1
Showing
15 changed files
with
94 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{/* Anti Ad Block */}} | ||
|
||
{{/* | ||
<script> | ||
if(true)!function(){fetch("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js").then().catch(()=>{var d=document;d.open();d.write("<style>body{background:black;user-select:none;color:red;text-align:center;font-weight:bold;font-family:monospace;}</style><p style='font-size:calc(100vw/10);'>AD BLOCKER DETECTED</p><p style='font-size:calc(100vw/12)'>DISABLE YOUR AD BLOCKER</p>");d.close();d.title="AD BLOCKER DETECTED";})}(); | ||
</script> | ||
*/}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{/* chroma css for noscript */}} | ||
|
||
<noscript> | ||
{{- with resources.Get "css/chroma_noscript.css" | toCSS | minify | fingerprint -}} | ||
<link rel="stylesheet" href="{{- .RelPermalink -}}" integrity="{{- .Data.Integrity -}}" crossorigin="anonymous" rel="preload stylesheet" as="style"> | ||
{{- end -}} | ||
</noscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1 @@ | ||
<!-- instant.page | Thanks: https://instant.page/ --> | ||
{{ with resources.Get "js/instantpage.min.js" | js.Build }} | ||
<script> | ||
{{ .Content | safeJS }} | ||
</script> | ||
{{ end }} | ||
{{- partial "instant_page.html" . -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,7 @@ | ||
{{- if site.Params.classification -}} | ||
{{ with site.Params.classification }} | ||
<meta name="classification" content="{{- range $i, $e := . }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}"> | ||
{{ end }} | ||
{{- end }} | ||
{{- partial "seo.html" . -}} | ||
|
||
{{- partial "anti_adblock.html" . -}} | ||
|
||
{{/* Added for SEO */}} | ||
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} | ||
{{ with .PublishDate }}<meta name="creation_date" content="{{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }}" />{{ end }} | ||
<meta name="coverage" content="japan" /> | ||
<meta name="content-language" content="ja" /> | ||
<link title="Search" href="{{ absURL "search/" }}" rel="search" /> | ||
<link title="Terms" href="{{ absURL "pages/terms/"}}" rel="copyright" /> | ||
<meta http-equiv="Content-Language" content="ja"> | ||
<meta name="HandheldFriendly" content="true" /> | ||
<meta name="MobileOptimized" content="320"> | ||
<meta name="format-detection" content="telephone=no" /> | ||
<meta name="robots" content="max-image-preview:large"> | ||
<link rel="preconnect dns-prefetch" href="//www.googletagmanager.com"> | ||
<link rel="preconnect dns-prefetch" href="//www.google-analytics.com"> | ||
{{- partial "pwa.html" . -}} | ||
|
||
|
||
{{/* Anti Ad Block */}} | ||
{{/* | ||
<script> | ||
if(true)!function(){fetch("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js").then().catch(()=>{var d=document;d.open();d.write("<style>body{background:black;user-select:none;color:red;text-align:center;font-weight:bold;font-family:monospace;}</style><p style='font-size:calc(100vw/10);'>AD BLOCKER DETECTED</p><p style='font-size:calc(100vw/12)'>DISABLE YOUR AD BLOCKER</p>");d.close();d.title="AD BLOCKER DETECTED";})}(); | ||
</script> | ||
*/}} | ||
{{/* End of Anti Ad Block */}} | ||
|
||
|
||
{{/* PWA | Thanks: https://aloha-ru.com/hugo/pwa-hugo/ */}} | ||
<script> | ||
if ("serviceWorker" in navigator) { | ||
navigator.serviceWorker.register("/blog/sw.js") | ||
} | ||
</script> | ||
{{/* End of PWA */}} | ||
|
||
|
||
{{/* PWA | Thanks: https://aloha-ru.com/hugo/pwa-hugo/ */}} | ||
<link rel="manifest" href="/manifest.json"> | ||
|
||
|
||
<noscript> | ||
{{ with resources.Get "css/chroma_noscript.css" | toCSS | minify | fingerprint }} | ||
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous" rel="preload stylesheet" as="style"> | ||
{{ end }} | ||
</noscript> | ||
{{- partial "chroma_noscript.html" . -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
<!-- Magnific Image Pop-Up Modal for Hugo | Thanks: https://gist.github.com/zjeaton/0cdd7e4bed9d292ab6f3d76b0369f16d --> | ||
{{- partial "image_modal.html" . -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
{{/* 公開日関連 | Thanks: https://aloha-ru.com/hugo/hugo-dateupdate/ */}} | ||
|
||
{{/* 公開日と更新日を変数に格納する */}} | ||
{{ $date := .Date.Format "2006-01-02" }} | ||
{{ $lastmod := .Lastmod.Format "2006-01-02" }} | ||
{{- $date := .Date.Format "2006-01-02" -}} | ||
{{- $lastmod := .Lastmod.Format "2006-01-02" -}} | ||
|
||
{{/* 公開日と更新日が違う場合、両方を表示 */}} | ||
{{ if and (ne $lastmod $date) }} | ||
<time itemprop="datePublished" datetime="{{ .Date }}">公開: {{ .Date.Format "2006-01-02" }}</time> | ||
{{- if and (ne $lastmod $date) -}} | ||
<time itemprop="datePublished" datetime="{{- .Date -}}">公開: {{- .Date.Format "2006-01-02" -}}</time> | ||
{{- if not .Lastmod.IsZero -}} | ||
<time itemprop="dateModified" datetime="{{ .Lastmod }}"> | 更新: {{ .Lastmod.Format "2006-01-02" }}</time> | ||
{{ end }} | ||
<time itemprop="dateModified" datetime="{{- .Lastmod -}}"> | 更新: {{- .Lastmod.Format "2006-01-02" -}}</time> | ||
{{- end -}} | ||
{{/* 公開日と更新日が同じ場合、公開日のみ表示 */}} | ||
{{ else }} | ||
{{- else -}} | ||
{{- if not .Date.IsZero -}} | ||
<time itemprop="datePublished" datetime="{{ .Date }}">公開: {{ .Date.Format "2006-01-02" }}</time> | ||
{{ end }} | ||
{{ end }} | ||
<time itemprop="datePublished" datetime="{{- .Date -}}">公開: {{- .Date.Format "2006-01-02" -}}</time> | ||
{{- end -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{/* instant.page | Thanks: https://instant.page/ */}} | ||
|
||
{{- with resources.Get "js/instantpage.min.js" | js.Build | minify -}} | ||
<script> | ||
{{- .Content | safeJS -}} | ||
</script> | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{/* PWA | Thanks: https://aloha-ru.com/hugo/pwa-hugo/ */}} | ||
|
||
<script> | ||
if ("serviceWorker" in navigator) { | ||
navigator.serviceWorker.register("/blog/sw.js") | ||
} | ||
</script> | ||
|
||
<link rel="manifest" href="/manifest.json"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
{{/* Show related posts | Thanks: https://github.com/adityatelange/hugo-PaperMod/pull/1049 */}} | ||
|
||
{{ $related := first 4 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }} | ||
{{ with $related }} | ||
<div class="related"> | ||
<h3 class="see-also">関連記事</h3> | ||
<ul> | ||
{{ range . }} | ||
<li> | ||
<a href="{{ .RelPermalink }}">{{ .Title }}</a> | ||
</li> | ||
{{ end }} | ||
</ul> | ||
</div> | ||
{{ end }} | ||
{{- $related := first 4 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) -}} | ||
{{- with $related -}} | ||
<div class="related"> | ||
<h3 class="see-also">関連記事</h3> | ||
<ul> | ||
{{- range . -}} | ||
<li> | ||
<a href="{{- .RelPermalink -}}">{{- .Title -}}</a> | ||
</li> | ||
{{- end -}} | ||
</ul> | ||
</div> | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{{/* Added for SEO */}} | ||
|
||
{{- if site.Params.classification -}} | ||
{{- with site.Params.classification -}} | ||
<meta name="classification" content="{{- range $i, $e := . -}}{{- if $i -}}, {{- end -}}{{- $e -}}{{- end -}}"> | ||
{{- end -}} | ||
{{- end }} | ||
|
||
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} | ||
{{- with .PublishDate -}} | ||
<meta name="creation_date" content="{{- .Format $iso8601 | printf "content=%q" | safeHTMLAttr -}}" /> | ||
{{- end -}} | ||
|
||
<meta name="coverage" content="japan" /> | ||
<meta name="content-language" content="ja" /> | ||
<link title="Search" href="{{- absURL "search/" -}}" rel="search" /> | ||
<link title="Terms" href="{{- absURL "pages/terms/" -}}" rel="copyright" /> | ||
<meta http-equiv="Content-Language" content="ja"> | ||
<meta name="HandheldFriendly" content="true" /> | ||
<meta name="MobileOptimized" content="320"> | ||
<meta name="format-detection" content="telephone=no" /> | ||
<meta name="robots" content="max-image-preview:large"> | ||
<link rel="preconnect dns-prefetch" href="//www.googletagmanager.com"> | ||
<link rel="preconnect dns-prefetch" href="//www.google-analytics.com"> |