mirror of https://github.com/luizdepra/hugo-coder.git

Lucas de Oliveira
14.31.2020 82ccf83b1e39a4eb557a80166fbc0b175da058e9
Use camelCase variables on custom_css, custom_js and custom_scss (#434)

* Rename custom_css variable to customCSS

* Rename custom_js variable to customJS

* Change contribuitors.md

* Rename custom_scss to customSCSS

* Add custom SCSS on example config.toml

* Add customSCSS on stackbit.yaml
4 files modified
21 ■■■■■ changed files
CONTRIBUTORS.md 1 ●●●● patch | view | raw | blame | history
exampleSite/config.toml 8 ●●●● patch | view | raw | blame | history
layouts/_default/baseof.html 6 ●●●● patch | view | raw | blame | history
stackbit.yaml 6 ●●●●● patch | view | raw | blame | history
CONTRIBUTORS.md
@@ -81,3 +81,4 @@
- [Rabin Adhikari](https://github.com/rabinadk1/)
- [Hussaini Zulkifli](https://github.com/hussaini/)
- [Ellison Leão](https://github.com/ellisonleao)
- [Lucas de Oliveira](https://github.com/lucas-dOliveira)
exampleSite/config.toml
@@ -52,10 +52,13 @@
    enableTwemoji = true
    # Custom CSS
    custom_css = []
    customCSS = []
    # Custom SCSS
    customSCSS = []
    # Custom JS
    custom_js = []
    customJS = []
# If you want to use fathom(https://usefathom.com) for analytics, add this section
[params.fathomAnalytics]
@@ -141,6 +144,7 @@
    [languages.pt-br]
        languagename = "Português"
        languageinitials = "BR"
        title = "João Ninguém"
        [languages.pt-br.params]
layouts/_default/baseof.html
@@ -57,11 +57,11 @@
      {{ end }}
    {{ end }}
    {{ range .Site.Params.custom_css }}
    {{ range .Site.Params.customCSS }}
      <link rel="stylesheet" href="{{ . | relURL }}" />
    {{ end }}
    {{ range .Site.Params.custom_scss }}
    {{ range .Site.Params.customSCSS }}
      {{/* We don't change the targetPath to because it's transparent to users */}}
      {{ if $.Site.IsServer }}
        {{ $cssOpts := (dict "enableSourceMap" true ) }}
@@ -117,7 +117,7 @@
      <script src="{{ $script.RelPermalink }}"></script>
    {{ end }}
    {{ range .Site.Params.custom_js }}
    {{ range .Site.Params.customJS }}
      <script src="{{ . | relURL }}"></script>
    {{ end }}
stackbit.yaml
@@ -79,9 +79,11 @@
          - type: number
            name: maxSeeAlsoItems
          - type: list
            name: custom_css
            name: customCSS
          - type: list
            name: custom_js
            name: customSCSS
          - type: list
            name: customJS
          - type: list
            name: social
            label: Social Media Icons