Make sidebar optional, make it possible to overide all parmas per post.
This commit is contained in:
parent
10d36011ee
commit
0299c650d5
6 changed files with 27 additions and 68 deletions
|
|
@ -2,9 +2,9 @@
|
|||
<meta name="MobileOptimized" content="width">
|
||||
<meta name="HandheldFriendly" content="true">
|
||||
{{ .Hugo.Generator }}
|
||||
<link rel="stylesheet" href="/css/styles.css{{ if .Site.Params.cacheBustCSS }}?{{ readFile "/public/css/styles.css" | sha1 }}{{ end }}">
|
||||
<link rel="stylesheet" href="/css/styles.css{{ if $.Param "cacheBustCSS" }}?{{ readFile "/public/css/styles.css" | sha1 }}{{ end }}">
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/vnd.microsoft.icon">
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||
{{ if and (.Site.RSSLink) (not .Site.Params.supressRSSLink) }}<link rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" href="{{ .Site.RSSLink }}">{{ end }}
|
||||
{{ with .Site.Params.contact }}<meta name="contact" content="{{ . }}">{{ end }}
|
||||
{{ if and (.Site.RSSLink) (not ($.Param "supressRSSLink")) }}<link rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" href="{{ .Site.RSSLink }}">{{ end }}
|
||||
{{ with $.Param "contact" }}<meta name="contact" content="{{ . }}">{{ end }}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
{{ if .Site.Params.jquery }}<script src="/js/jquery.min.js"></script>{{ end }}
|
||||
{{ if and .Site.Params.jquery .Site.Params.slicknav }}<script src="/js/jquery.slicknav.min.js"></script>{{ end }}
|
||||
{{ if .Site.Params.jquery }}<script src="/js/script.js{{ if .Site.Params.cacheBustJS }}?{{ readFile "/public/js/script.js" | sha1 }}{{ end }}"></script>{{ end }}
|
||||
{{ if $.Param "jquery" }}<script src="/js/jquery.min.js"></script>{{ end }}
|
||||
{{ if and ($.Param "jquery") ($.Param "slicknav") }}<script src="/js/jquery.slicknav.min.js"></script>{{ end }}
|
||||
{{ if $.Param "jquery" }}<script src="/js/script.js{{ if $.Param "cacheBustJS" }}?{{ readFile "/public/js/script.js" | sha1 }}{{ end }}"></script>{{ end }}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{{ $domain := .Site.BaseURL | replaceRE "^https?://(www\\.)?([^/]+)/?" "$2" }}
|
||||
<form class="search-form" method="get" action="https://duckduckgo.com/">
|
||||
<input type="search" name="q" class="search-text" placeholder="Search this site…" title="Enter the terms you wish to search for." size="{{ .Site.Params.searchSize | default "20" }}" maxlength="128">
|
||||
<input type="search" name="q" class="search-text" placeholder="Search this site…" title="Enter the terms you wish to search for." size="{{ $.Param "searchSize" | default "20" }}" maxlength="128">
|
||||
<input type="hidden" name="sites" value="{{ $domain }}">
|
||||
<input type="submit" value="DuckDuckGo Search" class="hidden">
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{{ if and (.RSSLink) (not .Site.Params.supressRSSLink) }}<link rel="alternate" type="application/rss+xml" title="{{ .Title }} - {{ .Site.Title }}" href="{{ .RSSLink }}">{{ end }}
|
||||
{{ if and (.RSSLink) (not ($.Param "supressRSSLink")) }}<link rel="alternate" type="application/rss+xml" title="{{ .Title }} - {{ .Site.Title }}" href="{{ .RSSLink }}">{{ end }}
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "NewsArticle",
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id":"{{ .Site.BaseURL }}"
|
||||
},
|
||||
"headline": "{{ .Title }} - {{ .Site.Title }}",
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .Site.BaseURL }}{{ .Params.thumbnail | default "images/default.png" }}",
|
||||
"height": 800,
|
||||
"width": 800
|
||||
},
|
||||
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05UTC" }}",
|
||||
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05UTC" }}",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ .Site.Title }}"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "{{ .Site.Title }}",
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .Site.BaseURL }}images/logo.png",
|
||||
"width": 600,
|
||||
"height": 60
|
||||
}
|
||||
},
|
||||
"description": "{{ .Description | default .Summary }}"
|
||||
}
|
||||
</script>
|
||||
|
|
@ -5,4 +5,4 @@
|
|||
<meta property="og:site_name" content="{{ .Site.Title }}">
|
||||
<meta property="og:description" content="{{ replaceRE "\n" "" (.Description | default .Summary) }}">
|
||||
<meta property="og:locale" content="{{ .Lang }}">
|
||||
{{ with .Params.thumbnail }}<meta property="og:image" content="{{ .Site.BaseURL }}{{ . }}">{{ end }}
|
||||
{{ with $.Param "thumbnail" }}<meta property="og:image" content="{{ .Site.BaseURL }}{{ . }}">{{ end }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue