From c5fbd48e918a6f43281ee4bb81c9b25922fe7758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Pannetier?= <35581688+clement-pannetier@users.noreply.github.com> Date: Wed, 4 Nov 2020 18:28:31 +0100 Subject: [PATCH] Update variables names to camelCase format for consistency (#473) --- exampleSite/config.toml | 28 ++++++++--------- .../content/posts/creating-a-new-theme.md | 2 +- exampleSite/content/posts/goisforlovers.md | 2 +- exampleSite/content/posts/hugoisforlovers.md | 2 +- layouts/_default/baseof.html | 8 ++--- layouts/partials/float.html | 2 +- layouts/partials/footer.html | 4 +-- layouts/partials/home.html | 2 +- layouts/partials/list.html | 2 +- layouts/partials/posts/commento.html | 4 +-- layouts/partials/posts/disqus.html | 2 +- layouts/partials/posts/series.html | 2 +- layouts/posts/li.html | 2 +- layouts/posts/single.html | 4 +-- stackbit.yaml | 30 +++++++++---------- 15 files changed, 48 insertions(+), 48 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 976a514..7020e38 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,16 +1,16 @@ -baseurl = "http://www.example.com" +baseURL = "http://www.example.com" title = "johndoe" theme = "hugo-coder" -languagecode = "en" -defaultcontentlanguage = "en" +languageCode = "en" +defaultContentLanguage = "en" paginate = 20 -pygmentsstyle = "b2" -pygmentscodefences = true -pygmentscodefencesguesssyntax = true +pygmentsStyle = "b2" +pygmentsCodeFences = true +pygmentsCodeFencesGuessSyntax = true disqusShortname = "yourdiscussshortname" @@ -19,11 +19,11 @@ disqusShortname = "yourdiscussshortname" description = "John Doe's personal website" keywords = "blog,developer,personal" info = "Full Stack DevOps and Magician" - avatarurl = "images/avatar.jpg" + avatarURL = "images/avatar.jpg" #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 hideCredits = false @@ -40,10 +40,10 @@ disqusShortname = "yourdiscussshortname" # "auto" (use preference set by browser) # "dark" (dark background, light foreground) # "light" (light background, dark foreground) (default) - colorscheme = "auto" + colorScheme = "auto" # Hide the toggle button, along with the associated vertical divider - hidecolorschemetoggle = false + hideColorSchemeToggle = false # Series see also post count maxSeeAlsoItems = 5 @@ -118,7 +118,7 @@ disqusShortname = "yourdiscussshortname" [languages] [languages.en] - languagename = "English" + languageName = "English" [languages.en.menu] @@ -144,7 +144,7 @@ disqusShortname = "yourdiscussshortname" [languages.pt-br] - languagename = "Português" + languageName = "Português" title = "João Ninguém" [languages.pt-br.params] @@ -152,7 +152,7 @@ disqusShortname = "yourdiscussshortname" info = "Full Stack DevOps e Mágico" description = "Sítio pessoal de João Ninguém" keywords = "blog,desenvolvedor,pessoal" - footercontent = "Coloque algum texto aqui." + footerContent = "Coloque algum texto aqui." [languages.pt-br.menu] diff --git a/exampleSite/content/posts/creating-a-new-theme.md b/exampleSite/content/posts/creating-a-new-theme.md index 0db1741..6534287 100644 --- a/exampleSite/content/posts/creating-a-new-theme.md +++ b/exampleSite/content/posts/creating-a-new-theme.md @@ -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 theme = "zafta" -baseurl = "" +baseURL = "" languageCode = "en-us" title = "zafta - totally refreshing" MetaDataFormat = "toml" diff --git a/exampleSite/content/posts/goisforlovers.md b/exampleSite/content/posts/goisforlovers.md index 4e6e7a4..5034b1b 100644 --- a/exampleSite/content/posts/goisforlovers.md +++ b/exampleSite/content/posts/goisforlovers.md @@ -241,7 +241,7 @@ instead of depending on the context. {{ $title := .Site.Title }} {{ range .Params.tags }} -
  • {{ . }} - {{ $title }}
  • +
  • {{ . }} - {{ $title }}
  • {{ end }} Notice how once we have entered the loop the value of {{ . }} has changed. We diff --git a/exampleSite/content/posts/hugoisforlovers.md b/exampleSite/content/posts/hugoisforlovers.md index f6a051c..4a009e9 100644 --- a/exampleSite/content/posts/hugoisforlovers.md +++ b/exampleSite/content/posts/hugoisforlovers.md @@ -12,7 +12,7 @@ categories = [ "golang", ] 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 diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index ec7eff4..1bc5222 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -45,7 +45,7 @@ {{ 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 }} {{ $cssOpts := (dict "targetPath" "css/coder-dark.css" "enableSourceMap" true ) }} {{ $styles := resources.Get "scss/coder-dark.scss" | resources.ExecuteAsTemplate "style.coder-dark.css" . | toCSS $cssOpts }} @@ -91,9 +91,9 @@ {{ $csClass := "colorscheme-light" }} - {{ if eq .Site.Params.colorscheme "dark" }} + {{ if eq .Site.Params.colorScheme "dark" }} {{ $csClass = "colorscheme-dark" }} - {{ else if eq .Site.Params.colorscheme "auto" }} + {{ else if eq .Site.Params.colorScheme "auto" }} {{ $csClass = "colorscheme-auto" }} {{ end }} - {{ if not .Site.Params.hidecolorschemetoggle }} + {{ if not .Site.Params.hideColorSchemeToggle }} {{ if .Site.IsServer }} {{ $script := resources.Get "js/dark-mode.js" }} diff --git a/layouts/partials/float.html b/layouts/partials/float.html index 2113d07..623047d 100644 --- a/layouts/partials/float.html +++ b/layouts/partials/float.html @@ -1,4 +1,4 @@ -{{ if not .Site.Params.hidecolorschemetoggle }} +{{ if not .Site.Params.hideColorSchemeToggle }}
    diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 5131448..c184381 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,7 +1,7 @@ {{ if not .Site.Params.hideFooter | default false }}