mirror of
https://github.com/softinio/softinio.com.git
synced 2025-09-05 11:16:41 -07:00
Initial migration to new theme
This commit is contained in:
parent
5ce643146c
commit
83e5d66863
27 changed files with 224 additions and 511 deletions
32
layouts/partials/head.html
Normal file
32
layouts/partials/head.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
<title>{{ if and .Title (ne (trim (lower .Site.Title) "") (trim (lower .Title) "")) }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
|
||||
<meta charset='utf-8'>
|
||||
{{ hugo.Generator }}
|
||||
{{- with .Site.Params.ga_verify }}
|
||||
<meta name="google-site-verification" content="{{ . }}" />
|
||||
{{- end }}
|
||||
<meta name = 'viewport' content = 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no'>
|
||||
<meta http-equiv = 'X-UA-Compatible' content = 'IE=edge'>
|
||||
{{- if (ne hugo.Environment "development") }}
|
||||
{{- partial "analytics.html" . }}
|
||||
{{- end }}
|
||||
{{- partial "opengraph.html" . }}
|
||||
{{- partial "favicon.html" . }}
|
||||
<link rel='canonical' href='{{ .Permalink }}'>
|
||||
<!-- author & description & keywords -->
|
||||
<meta name="author" content="{{ .Site.Params.author | safeHTML }}" />
|
||||
|
||||
{{- if .Description -}}
|
||||
<meta name="description" content="{{ .Description | safeHTML }}" />
|
||||
{{ else if .IsPage }}
|
||||
<meta name="description" content="{{ .Summary | plainify }}" />
|
||||
{{ else if .Site.Params.description }}
|
||||
<meta name="description" content="{{ .Site.Params.description | safeHTML }}" />
|
||||
{{- end -}}
|
||||
|
||||
{{- if .Keywords -}}
|
||||
{{ $length := len .Keywords | add -1 -}}
|
||||
<meta name="keywords" content="{{ range $index, $element := .Keywords }}{{ $element | safeHTML }}{{if ne $index $length }}, {{ end }}{{ end }}" />
|
||||
{{ else if .Site.Params.keywords }}
|
||||
{{ $length := len .Site.Params.keywords | add -1 -}}
|
||||
<meta name="keywords" content="{{ range $index, $element := .Site.Params.keywords }}{{ $element | safeHTML }}{{if ne $index $length }}, {{ end }}{{ end }}" />
|
||||
{{- end }}
|
Loading…
Add table
Add a link
Reference in a new issue