aboutsummaryrefslogtreecommitdiff
path: root/themes/ananke/layouts/partials/func/GetFeaturedImage.html
diff options
context:
space:
mode:
authorgabriel giovanini <1408882-gabrielgio@users.noreply.gitlab.com>2022-03-23 20:08:49 +0000
committergabriel giovanini <1408882-gabrielgio@users.noreply.gitlab.com>2022-03-23 20:08:49 +0000
commit6166cf8e4008b7d64053655f4093d0870a54ace1 (patch)
tree2d1f128e6e98e11eee7c5961ac571891d9affc1d /themes/ananke/layouts/partials/func/GetFeaturedImage.html
parentac8603a37fad988e6c7da99c26ee91a3be34ef55 (diff)
downloadgabrielgio.me-6166cf8e4008b7d64053655f4093d0870a54ace1.tar.gz
gabrielgio.me-6166cf8e4008b7d64053655f4093d0870a54ace1.tar.bz2
gabrielgio.me-6166cf8e4008b7d64053655f4093d0870a54ace1.zip
feat: Remove unused theme
Diffstat (limited to 'themes/ananke/layouts/partials/func/GetFeaturedImage.html')
-rw-r--r--themes/ananke/layouts/partials/func/GetFeaturedImage.html35
1 files changed, 0 insertions, 35 deletions
diff --git a/themes/ananke/layouts/partials/func/GetFeaturedImage.html b/themes/ananke/layouts/partials/func/GetFeaturedImage.html
deleted file mode 100644
index 3c0d5de..0000000
--- a/themes/ananke/layouts/partials/func/GetFeaturedImage.html
+++ /dev/null
@@ -1,35 +0,0 @@
-{{/*
- GetFeaturedImage
-
- This partial gets the url for featured image for a given page.
-
- If a featured_image was set in the page's front matter, then that will be used.
-
- If not set, this will search page resources to find an image that contains the word
- "cover", and if found, returns the path to that resource.
-
- If no featured_image was set, and there's no "cover" image in page resources, then
- this partial returns an empty string (which evaluates to false).
-
- @return Permalink to featured image, or an empty string if not found.
-
-*/}}
-
-{{/* Declare a new string variable, $linkToCover */}}
-{{ $linkToCover := "" }}
-
-{{/* Use the value from front matter if present */}}
-{{ if .Params.featured_image }}
- {{ $linkToCover = .Params.featured_image }}
-
-{{/* Find the first image with 'cover' in the name in this page bundle. */}}
-{{ else }}
- {{ $img := (.Resources.ByType "image").GetMatch "*cover*" }}
- {{ with $img }}
- {{ $linkToCover = .Permalink }}
- {{ end }}
-{{ end }}
-
-{{/* return either a permalink, or an empty string. Note that partials can only have a single
-return statement, so this needs to be at the end of the partial (and not in the if block) */}}
-{{ return $linkToCover }} \ No newline at end of file