Transition to Hugo Image Processing (#173)
* Update layout to use Hugo Image Processing. Created shortcode rimg that uses the srcset attribute to display responsive images. * Copy Static images to assets folder. * Add image processing to missing components + Update examples * Fix rendering in https://themes.gohugo.io/ Co-authored-by: Emruz Hossain <emruz@appscode.com>
This commit is contained in:
parent
ba1d6014d9
commit
a2b3c7fda2
53 changed files with 352 additions and 75 deletions
|
@ -1,3 +1,18 @@
|
|||
{{/* default favicon */}}
|
||||
{{ $favicon := "/images/favicon.png" }}
|
||||
|
||||
{{/* if favicon is provided in the config, then use that */}}
|
||||
{{ if site.Params.logo.favicon }}
|
||||
{{ $favicon = site.Params.logo.favicon }}
|
||||
{{ end }}
|
||||
|
||||
{{/* resize the favicon. don't resize svg because it is not supported */}}
|
||||
{{ $favicon := resources.Get $favicon }}
|
||||
{{ if and $favicon (ne $favicon.MediaType.SubType "svg") }}
|
||||
{{ $favicon = $favicon.Resize "42x" }}
|
||||
{{ end }}
|
||||
{{ $favicon = $favicon.RelPermalink}}
|
||||
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
|
@ -13,7 +28,7 @@
|
|||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css" />
|
||||
|
||||
<!--================= fab-icon =========================-->
|
||||
<link rel="icon" type="image/png" href="{{ site.Params.logo.favicon | default "/assets/images/favicon.png" | relURL }}" />
|
||||
<link rel="icon" type="image/png" href="{{ $favicon }}" />
|
||||
|
||||
<!--================= custom style overrides =========================-->
|
||||
<link rel="stylesheet" href="{{ "/assets/css/style.css" | relURL }}"/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue