Update variables names to camelCase format for consistency (#473)

This commit is contained in:
Clément Pannetier
2020-11-04 18:28:31 +01:00
committed by GitHub
parent 0ff1b0fb4c
commit c5fbd48e91
15 changed files with 48 additions and 48 deletions

View File

@@ -1,16 +1,16 @@
baseurl = "http://www.example.com" baseURL = "http://www.example.com"
title = "johndoe" title = "johndoe"
theme = "hugo-coder" theme = "hugo-coder"
languagecode = "en" languageCode = "en"
defaultcontentlanguage = "en" defaultContentLanguage = "en"
paginate = 20 paginate = 20
pygmentsstyle = "b2" pygmentsStyle = "b2"
pygmentscodefences = true pygmentsCodeFences = true
pygmentscodefencesguesssyntax = true pygmentsCodeFencesGuessSyntax = true
disqusShortname = "yourdiscussshortname" disqusShortname = "yourdiscussshortname"
@@ -19,11 +19,11 @@ disqusShortname = "yourdiscussshortname"
description = "John Doe's personal website" description = "John Doe's personal website"
keywords = "blog,developer,personal" keywords = "blog,developer,personal"
info = "Full Stack DevOps and Magician" info = "Full Stack DevOps and Magician"
avatarurl = "images/avatar.jpg" avatarURL = "images/avatar.jpg"
#gravatar = "john.doe@example.com" #gravatar = "john.doe@example.com"
footercontent = "Enter a text here." footerContent = "Enter a text here."
dateformat = "January 2, 2006" dateFormat = "January 2, 2006"
hideFooter = false hideFooter = false
hideCredits = false hideCredits = false
@@ -40,10 +40,10 @@ disqusShortname = "yourdiscussshortname"
# "auto" (use preference set by browser) # "auto" (use preference set by browser)
# "dark" (dark background, light foreground) # "dark" (dark background, light foreground)
# "light" (light background, dark foreground) (default) # "light" (light background, dark foreground) (default)
colorscheme = "auto" colorScheme = "auto"
# Hide the toggle button, along with the associated vertical divider # Hide the toggle button, along with the associated vertical divider
hidecolorschemetoggle = false hideColorSchemeToggle = false
# Series see also post count # Series see also post count
maxSeeAlsoItems = 5 maxSeeAlsoItems = 5
@@ -118,7 +118,7 @@ disqusShortname = "yourdiscussshortname"
[languages] [languages]
[languages.en] [languages.en]
languagename = "English" languageName = "English"
[languages.en.menu] [languages.en.menu]
@@ -144,7 +144,7 @@ disqusShortname = "yourdiscussshortname"
[languages.pt-br] [languages.pt-br]
languagename = "Português" languageName = "Português"
title = "João Ninguém" title = "João Ninguém"
[languages.pt-br.params] [languages.pt-br.params]
@@ -152,7 +152,7 @@ disqusShortname = "yourdiscussshortname"
info = "Full Stack DevOps e Mágico" info = "Full Stack DevOps e Mágico"
description = "Sítio pessoal de João Ninguém" description = "Sítio pessoal de João Ninguém"
keywords = "blog,desenvolvedor,pessoal" keywords = "blog,desenvolvedor,pessoal"
footercontent = "Coloque algum texto aqui." footerContent = "Coloque algum texto aqui."
[languages.pt-br.menu] [languages.pt-br.menu]

View File

@@ -309,7 +309,7 @@ Edit the file to add the theme, add a title for the site, and specify that all o
``` ```
$ vi config.toml $ vi config.toml
theme = "zafta" theme = "zafta"
baseurl = "" baseURL = ""
languageCode = "en-us" languageCode = "en-us"
title = "zafta - totally refreshing" title = "zafta - totally refreshing"
MetaDataFormat = "toml" MetaDataFormat = "toml"

View File

@@ -241,7 +241,7 @@ instead of depending on the context.
{{ $title := .Site.Title }} {{ $title := .Site.Title }}
{{ range .Params.tags }} {{ range .Params.tags }}
<li> <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a> - {{ $title }} </li> <li> <a href="{{ $baseURL }}/tags/{{ . | urlize }}">{{ . }}</a> - {{ $title }} </li>
{{ end }} {{ end }}
Notice how once we have entered the loop the value of {{ . }} has changed. We Notice how once we have entered the loop the value of {{ . }} has changed. We

View File

@@ -12,7 +12,7 @@ categories = [
"golang", "golang",
] ]
series = ["Getting Started", "Hugo"] series = ["Getting Started", "Hugo"]
featured_image = "https://imgs.xkcd.com/comics/angular_momentum.jpg" featuredImage = "https://imgs.xkcd.com/comics/angular_momentum.jpg"
+++ +++
## Step 1. Install Hugo ## Step 1. Install Hugo

View File

@@ -45,7 +45,7 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if or (eq .Site.Params.colorscheme "auto") (eq .Site.Params.colorscheme "dark") }} {{ if or (eq .Site.Params.colorScheme "auto") (eq .Site.Params.colorScheme "dark") }}
{{ if .Site.IsServer }} {{ if .Site.IsServer }}
{{ $cssOpts := (dict "targetPath" "css/coder-dark.css" "enableSourceMap" true ) }} {{ $cssOpts := (dict "targetPath" "css/coder-dark.css" "enableSourceMap" true ) }}
{{ $styles := resources.Get "scss/coder-dark.scss" | resources.ExecuteAsTemplate "style.coder-dark.css" . | toCSS $cssOpts }} {{ $styles := resources.Get "scss/coder-dark.scss" | resources.ExecuteAsTemplate "style.coder-dark.css" . | toCSS $cssOpts }}
@@ -91,9 +91,9 @@
</head> </head>
{{ $csClass := "colorscheme-light" }} {{ $csClass := "colorscheme-light" }}
{{ if eq .Site.Params.colorscheme "dark" }} {{ if eq .Site.Params.colorScheme "dark" }}
{{ $csClass = "colorscheme-dark" }} {{ $csClass = "colorscheme-dark" }}
{{ else if eq .Site.Params.colorscheme "auto" }} {{ else if eq .Site.Params.colorScheme "auto" }}
{{ $csClass = "colorscheme-auto" }} {{ $csClass = "colorscheme-auto" }}
{{ end }} {{ end }}
<body class="{{ $csClass }}{{ if .Site.Params.rtl }} rtl{{ end }}" <body class="{{ $csClass }}{{ if .Site.Params.rtl }} rtl{{ end }}"
@@ -110,7 +110,7 @@
{{ partial "footer.html" . }} {{ partial "footer.html" . }}
</main> </main>
{{ if not .Site.Params.hidecolorschemetoggle }} {{ if not .Site.Params.hideColorSchemeToggle }}
{{ if .Site.IsServer }} {{ if .Site.IsServer }}
{{ $script := resources.Get "js/dark-mode.js" }} {{ $script := resources.Get "js/dark-mode.js" }}
<script src="{{ $script.RelPermalink }}"></script> <script src="{{ $script.RelPermalink }}"></script>

View File

@@ -1,4 +1,4 @@
{{ if not .Site.Params.hidecolorschemetoggle }} {{ if not .Site.Params.hideColorSchemeToggle }}
<div class="float-container"> <div class="float-container">
<a id="dark-mode-toggle" class="colorscheme-toggle"> <a id="dark-mode-toggle" class="colorscheme-toggle">
<i class="fa fa-adjust fa-fw" aria-hidden="true"></i> <i class="fa fa-adjust fa-fw" aria-hidden="true"></i>

View File

@@ -1,7 +1,7 @@
{{ if not .Site.Params.hideFooter | default false }} {{ if not .Site.Params.hideFooter | default false }}
<footer class="footer"> <footer class="footer">
<section class="container"> <section class="container">
{{ with .Site.Params.footercontent | safeHTML }} {{ with .Site.Params.footerContent | safeHTML }}
<p>{{ . }}</p> <p>{{ . }}</p>
{{ end }} {{ end }}
{{ if not .Site.Params.hideCopyright }} {{ if not .Site.Params.hideCopyright }}
@@ -10,7 +10,7 @@
{{ .Site.Params.since }} - {{ .Site.Params.since }} -
{{ end }} {{ end }}
{{ now.Year }} {{ now.Year }}
{{ with .Site.Params.Author }} {{ . }} {{ end }} {{ with .Site.Params.author }} {{ . }} {{ end }}
{{ end }} {{ end }}
{{ if not .Site.Params.hideCredits }} {{ if not .Site.Params.hideCredits }}
{{ if not .Site.Params.hideCopyright }} · {{ end }} {{ if not .Site.Params.hideCopyright }} · {{ end }}

View File

@@ -1,7 +1,7 @@
<section class="container centered"> <section class="container centered">
<div class="about"> <div class="about">
{{ if and (isset .Site.Params "avatarurl") (not (isset .Site.Params "gravatar")) }} {{ if and (isset .Site.Params "avatarurl") (not (isset .Site.Params "gravatar")) }}
{{ with .Site.Params.avatarurl }} {{ with .Site.Params.avatarURL }}
<div class="avatar"><img src="{{ . | relURL }}" alt="avatar"></div> <div class="avatar"><img src="{{ . | relURL }}" alt="avatar"></div>
{{ end }} {{ end }}
{{ end }} {{ end }}

View File

@@ -12,7 +12,7 @@
{{ range .Paginator.Pages }} {{ range .Paginator.Pages }}
<li> <li>
<span class="date">{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span> <span class="date">{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span>
<a class="title" href="{{ .Params.ExternalLink | default .RelPermalink }}">{{ .Title }}</a> <a class="title" href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>

View File

@@ -1,4 +1,4 @@
{{- if and (isset .Site.Params "commentourl") (not (eq .Site.Params.commentoUrl "" )) (eq (.Params.disable_comments | default false) false) -}} {{- if and (isset .Site.Params "commentourl") (not (eq .Site.Params.commentoURL "" )) (eq (.Params.disableComments | default false) false) -}}
<div id="commento"></div> <div id="commento"></div>
<script src="{{ .Site.Params.commentoUrl }}/js/commento.js"></script> <script src="{{ .Site.Params.commentoURL }}/js/commento.js"></script>
{{- end -}} {{- end -}}

View File

@@ -1,3 +1,3 @@
{{- if and (not (eq (.Site.DisqusShortname | default "") "")) (eq (.Params.disable_comments | default false) false) -}} {{- if and (not (eq (.Site.DisqusShortname | default "") "")) (eq (.Params.disableComments | default false) false) -}}
{{ template "_internal/disqus.html" . }} {{ template "_internal/disqus.html" . }}
{{- end -}} {{- end -}}

View File

@@ -12,7 +12,7 @@
{{ range first (add $maxItems 1) $series.Pages }} {{ range first (add $maxItems 1) $series.Pages }}
{{ if ne .RelPermalink $currentPageUrl }} {{ if ne .RelPermalink $currentPageUrl }}
<li> <li>
<a href="{{ .Params.ExternalLink | default .RelPermalink }}">{{ .Title }}</a> <a href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a>
</li> </li>
{{ end }} {{ end }}
{{ end }} {{ end }}

View File

@@ -1,4 +1,4 @@
<li> <li>
<span class="date">{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span> <span class="date">{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span>
<a class="title" href="{{ .Params.ExternalLink | default .RelPermalink }}">{{ .Title }}</a> <a class="title" href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a>
</li> </li>

View File

@@ -28,8 +28,8 @@
</header> </header>
<div> <div>
{{ if .Params.featured_image }} {{ if .Params.featuredImage }}
<img src='{{ .Params.featured_image }}' alt="Featured image"/> <img src='{{ .Params.featuredImage }}' alt="Featured image"/>
{{ end }} {{ end }}
{{ .Content }} {{ .Content }}
</div> </div>

View File

@@ -17,13 +17,13 @@ models:
label: Title label: Title
required: true required: true
- type: string - type: string
name: baseurl name: baseURL
label: Base URL label: Base URL
description: Hostname (and path) to the root description: Hostname (and path) to the root
- type: string - type: string
name: languagecode name: languageCode
- type: string - type: string
name: defaultcontentlanguage name: defaultContentLanguage
- type: string - type: string
name: themesDir name: themesDir
- type: string - type: string
@@ -32,13 +32,13 @@ models:
- type: number - type: number
name: paginate name: paginate
- type: boolean - type: boolean
name: canonifyurls name: canonifyURLs
- type: string - type: string
name: pygmentsstyle name: pygmentsStyle
- type: boolean - type: boolean
name: pygmentscodefences name: pygmentsCodeFences
- type: boolean - type: boolean
name: pygmentscodefencesguesssyntax name: pygmentsCodeFencesGuessSyntax
- type: string - type: string
name: disqusShortname name: disqusShortname
- type: object - type: object
@@ -55,19 +55,19 @@ models:
- type: string - type: string
name: info name: info
- type: string - type: string
name: avatarurl name: avatarURL
- type: boolean - type: boolean
name: hideFooter name: hideFooter
- type: string - type: string
name: footercontent name: footerContent
- type: string - type: string
name: dateformat name: dateFormat
- type: boolean - type: boolean
name: hideCredits name: hideCredits
- type: boolean - type: boolean
name: hideCopyright name: hideCopyright
- type: boolean - type: boolean
name: hidecolorschemetoggle name: hideColorSchemeToggle
- type: number - type: number
name: since name: since
- type: string - type: string
@@ -75,7 +75,7 @@ models:
- type: boolean - type: boolean
name: rtl name: rtl
- type: string - type: string
name: colorscheme name: colorScheme
- type: number - type: number
name: maxSeeAlsoItems name: maxSeeAlsoItems
- type: list - type: list
@@ -215,7 +215,7 @@ models:
items: items:
type: string type: string
- type: image - type: image
name: featured_image name: featuredImage
label: Featured Image label: Featured Image
description: Image featured in post display description: Image featured in post display
snippets: snippets:
@@ -231,7 +231,7 @@ models:
label: Language Config label: Language Config
fields: fields:
- type: string - type: string
name: languagename name: languageName
- type: string - type: string
name: title name: title
- type: object - type: object
@@ -246,7 +246,7 @@ models:
- type: string - type: string
name: keywords name: keywords
- type: string - type: string
name: footercontent name: footerContent
- type: number - type: number
name: since name: since
- type: object - type: object