Fix issue with deprecated class and make accent a config var
This commit is contained in:
parent
2c8d89e4c3
commit
b4fe04727f
6 changed files with 12 additions and 21 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
|
@ -1,6 +1,3 @@
|
|||
.hugo_build.lock
|
||||
.DS_Store
|
||||
resources/
|
||||
todo.md
|
||||
exampleSite/public/
|
||||
public/*
|
||||
.env
|
||||
.hugo_build.lock
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
font-size: 75%;
|
||||
--color-dark: #1a1a1a;
|
||||
--color-light: #faf8f4;
|
||||
--color-primary: #EF9F27;
|
||||
--color-primary: {{ .Site.Params.accentColor }};
|
||||
--size: 1rem;
|
||||
--spacing: calc(var(--size) * 2.4);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
[params]
|
||||
accentColor = "#EF9F27"
|
||||
[module]
|
||||
[[module.imports]]
|
||||
path = 'forge.alexselimov.com/aselimov/hugo-unified-git-activity'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
|
||||
<html lang="{{ with .Site.Language.Lang }}{{ . }}{{ else }}en-US{{ end }}">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
|
||||
{{- $authorEmail := "" }}
|
||||
{{- with site.Params.author }}
|
||||
{{- if reflect.IsMap . }}
|
||||
|
|
@ -6,14 +5,8 @@
|
|||
{{- $authorEmail = . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- with site.Author.email }}
|
||||
{{- $authorEmail = . }}
|
||||
{{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
|
||||
{{- $authorName := "" }}
|
||||
{{- with site.Params.author }}
|
||||
{{- if reflect.IsMap . }}
|
||||
|
|
@ -21,12 +14,7 @@
|
|||
{{- $authorName = . }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- $authorName = . }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- with site.Author.name }}
|
||||
{{- $authorName = . }}
|
||||
{{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
|
@ -49,7 +37,11 @@
|
|||
<link>{{ .Permalink }}</link>
|
||||
<description>Recent content {{ if not .IsHome }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }}
|
||||
{{ with site.Language.Lang }}
|
||||
<language>{{ . }}</language>
|
||||
{{ else }}
|
||||
<language>en</language>
|
||||
{{ end }}{{ with $authorEmail }}
|
||||
<managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
|
||||
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with .Site.Copyright }}
|
||||
<copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ https://forge.alexselimov.com/aselimov/upvoters server to handle anonymous upvot
|
|||
homepage = "https://forge.alexselimov.com/aselimov/hugo-bearcub"
|
||||
|
||||
tags = ["blog", "responsive", "minimal", "personal", "dark", "multilingual"]
|
||||
features = ["favicon", "seo", "no javascript", "rss", "social cards"]
|
||||
features = ["favicon", "seo", "rss", "social cards"]
|
||||
|
||||
# If the theme has a single author
|
||||
[author]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue