mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-14 09:04:41 -04:00
Fix deprecation warnings
This commit is contained in:
parent
ed95a341a1
commit
48c577121a
@ -12,7 +12,7 @@
|
|||||||
<title>{{ block "title" . }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
|
<title>{{ block "title" . }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width,minimum-scale=1">
|
<meta name="viewport" content="width=device-width,minimum-scale=1">
|
||||||
{{ .Hugo.Generator }}
|
{{ hugo.Generator }}
|
||||||
|
|
||||||
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
|
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
|
||||||
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
|
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ $currentPageUrl := .URL }}
|
{{ $currentPageUrl := .RelPermalink }}
|
||||||
|
|
||||||
<article class="cf ph4 pv3 pv5-ns">
|
<article class="cf ph4 pv3 pv5-ns">
|
||||||
<!-- header spans the full width -->
|
<!-- header spans the full width -->
|
||||||
@ -13,7 +13,7 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<h1 class="lh-title fw9 mb7 mv0 pt3">
|
<h1 class="lh-title fw9 mb7 mv0 pt3">
|
||||||
<a href="{{ .URL }}" class="link primary-color dim">
|
<a href="{{ .RelPermalink }}" class="link primary-color dim">
|
||||||
{{ .Title }}
|
{{ .Title }}
|
||||||
</a>
|
</a>
|
||||||
</h1>
|
</h1>
|
||||||
@ -66,9 +66,9 @@
|
|||||||
<ul class="list dib nested-links ml0 pl0">
|
<ul class="list dib nested-links ml0 pl0">
|
||||||
<li class="dib mb2 mr2">Related:</li>
|
<li class="dib mb2 mr2">Related:</li>
|
||||||
{{ range $tags.Pages }}
|
{{ range $tags.Pages }}
|
||||||
{{ if ne .URL $currentPageUrl }}
|
{{ if ne .RelPermalink $currentPageUrl }}
|
||||||
<li class="mb2 mr3">
|
<li class="mb2 mr3">
|
||||||
<a href="{{ .URL }}" class="link">
|
<a href="{{ .RelPermalink }}" class="link">
|
||||||
{{ .LinkTitle }}
|
{{ .LinkTitle }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<h1 class="near-black f3">
|
<h1 class="near-black f3">
|
||||||
<a href="{{ .context.URL }}" class="link primary-color dim">
|
<a href="{{ .context.RelPermalink }}" class="link primary-color dim">
|
||||||
{{- if eq .context.Section "functions" -}}
|
{{- if eq .context.Section "functions" -}}
|
||||||
{{ .context.LinkTitle }}
|
{{ .context.LinkTitle }}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
{{ range first 4 ( sort (where .Pages "Section" "news") "Date" "desc" ) }}
|
{{ range first 4 ( sort (where .Pages "Section" "news") "Date" "desc" ) }}
|
||||||
<!-- only show 2 boxes on mobile -->
|
<!-- only show 2 boxes on mobile -->
|
||||||
{{ $.Scratch.Add "i" 1 }}{{ $i := $.Scratch.Get "i" }}
|
{{ $.Scratch.Add "i" 1 }}{{ $i := $.Scratch.Get "i" }}
|
||||||
<a href="{{ .URL }}" class="link lh-copy light-gray f6 w-100 w-50-m w-25-l bg-animate hover-bg-accent-color hover-white pv3 pv4-ns ph3 ph4-ns{{ if ge $i 3 }} dn dib-l{{ else }} dib{{ end }}">
|
<a href="{{ .RelPermalink }}" class="link lh-copy light-gray f6 w-100 w-50-m w-25-l bg-animate hover-bg-accent-color hover-white pv3 pv4-ns ph3 ph4-ns{{ if ge $i 3 }} dn dib-l{{ else }} dib{{ end }}">
|
||||||
<span class="f6 gray pb1 db">
|
<span class="f6 gray pb1 db">
|
||||||
{{ .Date.Format "January 2, 2006" }}
|
{{ .Date.Format "January 2, 2006" }}
|
||||||
</span>
|
</span>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="bg-white mb3 pa4 gray overflow-hidden">
|
<div class="bg-white mb3 pa4 gray overflow-hidden">
|
||||||
<span class="f6 db">{{ humanize .Section }}</span>
|
<span class="f6 db">{{ humanize .Section }}</span>
|
||||||
<h1 class="f3 near-black">
|
<h1 class="f3 near-black">
|
||||||
<a href="{{ .URL }}" class="link black dim">
|
<a href="{{ .RelPermalink }}" class="link black dim">
|
||||||
{{ .Title }}
|
{{ .Title }}
|
||||||
</a>
|
</a>
|
||||||
</h1>
|
</h1>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{{ $currentPage := . }}
|
{{ $currentPage := . }}
|
||||||
{{ $currentURL := .URL }}
|
{{ $currentURL := .RelPermalink }}
|
||||||
<header class="ph4 flex pv4 bg-light-gray">
|
<header class="ph4 flex pv4 bg-light-gray">
|
||||||
<ul class="list ma0 pa0 ">
|
<ul class="list ma0 pa0 ">
|
||||||
<!-- TODO: Active classes -->
|
<!-- TODO: Active classes -->
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{{ $currentPageUrl := .URL }}
|
{{ $currentPageUrl := .RelPermalink }}
|
||||||
{{ if and .Params.tags .Site.Taxonomies.tags }}
|
{{ if and .Params.tags .Site.Taxonomies.tags }}
|
||||||
{{ $name := index .Params.tags 0 }}
|
{{ $name := index .Params.tags 0 }}
|
||||||
{{ $name := $name | urlize }}
|
{{ $name := $name | urlize }}
|
||||||
@ -24,9 +24,9 @@
|
|||||||
Related entries:
|
Related entries:
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if ne .URL $currentPageUrl }}
|
{{ if ne .RelPermalink $currentPageUrl }}
|
||||||
<li class="db dib-l mb2 mr3">
|
<li class="db dib-l mb2 mr3">
|
||||||
<a href="{{ .URL }}" class="link">
|
<a href="{{ .RelPermalink }}" class="link">
|
||||||
{{ .LinkTitle }}
|
{{ .LinkTitle }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user