First commit
Delete exampleSite Add initial content, images & docker-compose.yml Use extend-head.html for analytics Set remote url to gitea.novicelab.io
This commit is contained in:
37
layouts/partials/init.html
Normal file
37
layouts/partials/init.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{{/* disableImageOptimization */}}
|
||||
{{ site.Store.Set "disableImageOptimization" (site.Params.disableImageOptimization | default false) }}
|
||||
|
||||
{{/* defaultFeaturedImage */}}
|
||||
{{ $defaultFeaturedImage := "" }}
|
||||
{{ $defaultFeaturedImageURL := "" }}
|
||||
{{ with site.Params.defaultFeaturedImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ if site.Params.hotlinkFeatureImage }}
|
||||
{{ $defaultFeaturedImageURL = . }}
|
||||
{{ else }}
|
||||
{{ $defaultFeaturedImage = resources.GetRemote . }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ $defaultFeaturedImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ site.Store.Set "defaultFeaturedImage" (dict "url" $defaultFeaturedImageURL "obj" $defaultFeaturedImage) }}
|
||||
|
||||
{{/* defaultBackgroundImage */}}
|
||||
{{ $defaultBackgroundImage := "" }}
|
||||
{{ $defaultBackgroundImageURL := "" }}
|
||||
{{ with site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ if site.Params.hotlinkFeatureImage }}
|
||||
{{ $defaultBackgroundImageURL = . }}
|
||||
{{ else }}
|
||||
{{ $defaultBackgroundImage = resources.GetRemote . }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ $defaultBackgroundImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ site.Store.Set "defaultBackgroundImage" (dict "url" $defaultBackgroundImageURL "obj" $defaultBackgroundImage) }}
|
||||
|
||||
{{/* backgroundImageWidth */}}
|
||||
{{ site.Store.Set "backgroundImageWidth" (print (site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
Reference in New Issue
Block a user