mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 02:14:21 +00:00
1 parent
6c86640af4
commit
ce75013228
8 files changed
+15
-8
No files matched your search
File renamed without changes.
@@ -6,11 +6,11 @@
|
||||
"theme_color": "{{ $scr.Get "primary" }}",
|
||||
"background_color": "{{ $scr.Get "primary" }}",
|
||||
"icons": [{
|
||||
"src": "../img/icon-192.png",
|
||||
"src": "{{ (partial "functions/get_icon" 192).RelPermalink }}",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
}, {
|
||||
"src": "../img/icon-512.png",
|
||||
"src": "{{ (partial "functions/get_icon" 512).RelPermalink }}",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}],
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{{/* Function to get website icon image. */}}
|
||||
{{/* Input: size (int) */}}
|
||||
{{/* Output: resource (obj) */}}
|
||||
|
||||
{{ $icon := resources.GetMatch "images/icon.png" }}
|
||||
{{ $icon_resized := $icon.Fill (printf "%sx%s Center" (string .) (string .)) }}
|
||||
{{ return $icon_resized }}
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
{{ $author := partial "functions/get_author_name" $page }}
|
||||
{{ $publisher := site.Params.org_name | default site.Title }}
|
||||
{{ $logo_url := printf "img/%s" (site.Params.logo | default "icon-512.png") | absURL }}
|
||||
{{ $logo_url := (printf "img/%s" (site.Params.logo | absURL)) | default (partial "functions/get_icon" 512).Permalink }}
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
|
||||
@@ -142,8 +142,8 @@
|
||||
{{ end }}
|
||||
|
||||
<link rel="manifest" href="{{ "index.webmanifest" | relLangURL }}">
|
||||
<link rel="icon" type="image/png" href="{{ "img/icon-32.png" | relURL }}">
|
||||
<link rel="apple-touch-icon" type="image/png" href="{{ "img/icon-192.png" | relURL }}">
|
||||
<link rel="icon" type="image/png" href="{{(partial "functions/get_icon" 32).RelPermalink}}">
|
||||
<link rel="apple-touch-icon" type="image/png" href="{{(partial "functions/get_icon" 192).RelPermalink}}">
|
||||
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
{{ $og_image = (printf "img/%s" site.Params.avatar) | absURL }}
|
||||
{{ $twitter_card = "summary" }}
|
||||
{{ else }}
|
||||
{{ $og_image = "img/icon-192.png" | absURL }}
|
||||
{{ $og_image = (partial "functions/get_icon" 512).Permalink }}
|
||||
{{ $twitter_card = "summary" }}
|
||||
{{ end }}
|
||||
{{ $scr.Set "og_image" $og_image }}{{/* Set `og_image` globally for `rss.xml`. */}}
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
<meta name="generator" content="Source Themes Academic {{ site.Data.academic.version }}">
|
||||
|
||||
<link rel="manifest" href="{{ "index.webmanifest" | relLangURL }}">
|
||||
<link rel="icon" type="image/png" href="{{ "img/icon-32.png" | relURL }}">
|
||||
<link rel="apple-touch-icon" type="image/png" href="{{ "img/icon-192.png" | relURL }}">
|
||||
<link rel="icon" type="image/png" href="{{(partial "functions/get_icon" 32).RelPermalink}}">
|
||||
<link rel="apple-touch-icon" type="image/png" href="{{(partial "functions/get_icon" 192).RelPermalink}}">
|
||||
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB |
Reference in new issue
Block a user