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

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Cai <hi@jimmycai.com>2020-09-18 01:35:43 +0300
committerGitHub <noreply@github.com>2020-09-18 01:35:43 +0300
commitd29272782153fc16cfbc9c72ed638b8fe32a57f6 (patch)
treee0a4bf25fddafdb6e64a224396d508d641238ec5
parentb540350d76c3710642d9349bac021e8345321a8f (diff)
parent93146c9dc3bad709794962b33580dac715e194ad (diff)
Merge branch 'master' into custom-taxonomy-permalink
-rw-r--r--layouts/_default/archives.html2
-rw-r--r--layouts/_default/term.html2
-rw-r--r--layouts/partials/article-list/compact.html3
-rw-r--r--layouts/partials/article-list/default.html2
-rw-r--r--layouts/partials/article-list/tile.html2
-rw-r--r--layouts/partials/article/components/details.html2
-rw-r--r--layouts/partials/article/components/header.html3
-rw-r--r--layouts/partials/article/components/related-contents.html2
-rw-r--r--layouts/partials/head/opengraph/provider/base.html2
-rw-r--r--layouts/partials/head/opengraph/provider/twitter.html2
10 files changed, 10 insertions, 12 deletions
diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html
index 18b3f6c..cf9ef94 100644
--- a/layouts/_default/archives.html
+++ b/layouts/_default/archives.html
@@ -7,7 +7,7 @@
<div class="category-list">
<div class="article-list--tile">
{{ range $categories }}
- {{ partial "article-list/tile" (dict "context" . "size" "250x150") }}
+ {{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "taxonomy") }}
{{ end }}
</div>
</div>
diff --git a/layouts/_default/term.html b/layouts/_default/term.html
index 91021c4..3189e9a 100644
--- a/layouts/_default/term.html
+++ b/layouts/_default/term.html
@@ -9,7 +9,7 @@
{{ end }}
</div>
- {{ $image := partialCached "helper/image" (dict "Context" . "Type" "taxonomy") .RelPermalink }}
+ {{- $image := partialCached "helper/image" (dict "Context" . "Type" "taxonomy") .RelPermalink "taxonomy" -}}
{{ if $image.exists }}
<div class="taxonomy-image">
{{ if $image.resource }}
diff --git a/layouts/partials/article-list/compact.html b/layouts/partials/article-list/compact.html
index 344086e..e9fa77d 100644
--- a/layouts/partials/article-list/compact.html
+++ b/layouts/partials/article-list/compact.html
@@ -12,8 +12,7 @@
</footer>
</div>
- {{ $image := partialCached "helper/image" (dict "Context" . "Type" "articleList") .RelPermalink }}
-
+ {{- $image := partialCached "helper/image" (dict "Context" . "Type" "articleList") .RelPermalink "articleList" -}}
{{ if $image.exists }}
<div class="article-image">
{{ if $image.resource }}
diff --git a/layouts/partials/article-list/default.html b/layouts/partials/article-list/default.html
index 92c82b6..106d8d6 100644
--- a/layouts/partials/article-list/default.html
+++ b/layouts/partials/article-list/default.html
@@ -1,4 +1,4 @@
-{{ $image := partialCached "helper/image" (dict "Context" . "Type" "articleList") .RelPermalink }}
+{{ $image := partialCached "helper/image" (dict "Context" . "Type" "articleList") .RelPermalink "articleList" }}
<article class="{{ if $image.exists }}has-image{{ end }}">
{{ if $image.exists }}
<div class="article-image">
diff --git a/layouts/partials/article-list/tile.html b/layouts/partials/article-list/tile.html
index b846681..0edf2e5 100644
--- a/layouts/partials/article-list/tile.html
+++ b/layouts/partials/article-list/tile.html
@@ -1,4 +1,4 @@
-{{ $image := partialCached "helper/image" (dict "Context" .context "Type" .Type) .context.RelPermalink }}
+{{ $image := partialCached "helper/image" (dict "Context" .context "Type" .Type) .context.RelPermalink .Type }}
<article class="{{ if $image.exists }}has-image{{ end }}">
<a href="{{ .context.Permalink }}">
diff --git a/layouts/partials/article/components/details.html b/layouts/partials/article/components/details.html
index 1e7ea18..1a3faa9 100644
--- a/layouts/partials/article/components/details.html
+++ b/layouts/partials/article/components/details.html
@@ -1,4 +1,4 @@
-{{- $image := partialCached "helper/image" (dict "Context" .) .RelPermalink -}}
+{{ $image := partialCached "helper/image" (dict "Context" . "Type" "article") .RelPermalink "article" }}
{{- $context := . -}}
{{- $categories := .Params.categories -}}
<div class="article-details">
diff --git a/layouts/partials/article/components/header.html b/layouts/partials/article/components/header.html
index 94b5950..7707b1d 100644
--- a/layouts/partials/article/components/header.html
+++ b/layouts/partials/article/components/header.html
@@ -1,6 +1,5 @@
<header class="article-header">
- {{ $image := partialCached "helper/image" (dict "Context" . "Type" "article") .RelPermalink }}
-
+ {{- $image := partialCached "helper/image" (dict "Context" . "Type" "article") .RelPermalink "article" -}}
{{ if $image.exists }}
<div class="article-image">
{{ if $image.resource }}
diff --git a/layouts/partials/article/components/related-contents.html b/layouts/partials/article/components/related-contents.html
index 2f3b52c..b06fce6 100644
--- a/layouts/partials/article/components/related-contents.html
+++ b/layouts/partials/article/components/related-contents.html
@@ -5,7 +5,7 @@
<div class="related-contents">
<div class="flex article-list--tile">
{{ range . }}
- {{ partial "article-list/tile" (dict "context" . "size" "250x150") }}
+ {{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "articleList") }}
{{ end }}
</div>
</div>
diff --git a/layouts/partials/head/opengraph/provider/base.html b/layouts/partials/head/opengraph/provider/base.html
index 10dddb9..8e90a45 100644
--- a/layouts/partials/head/opengraph/provider/base.html
+++ b/layouts/partials/head/opengraph/provider/base.html
@@ -37,7 +37,7 @@
{{- end -}}
{{- end -}}
-{{ $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink }}
+{{ $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" }}
{{- if $image.exists -}}
<meta property='og:image' content='{{ absURL $image.permalink }}' />
{{- end -}} \ No newline at end of file
diff --git a/layouts/partials/head/opengraph/provider/twitter.html b/layouts/partials/head/opengraph/provider/twitter.html
index a33757b..ecb6680 100644
--- a/layouts/partials/head/opengraph/provider/twitter.html
+++ b/layouts/partials/head/opengraph/provider/twitter.html
@@ -8,7 +8,7 @@
<meta name="twitter:title" content="{{ $title }}">
<meta name="twitter:description" content="{{ $description }}">
-{{- $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink -}}
+{{- $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" -}}
{{- if $image.exists -}}
<meta name="twitter:card" content="{{ .Site.Params.opengraph.twitter.card }}">
<meta name="twitter:image" content='{{ absURL $image.permalink }}' />