Skip to content

Issues with mdlPrimary & mdlSecondary #14

@dvelasquez

Description

@dvelasquez

Hi guys, i was having some issues trying to change the default Grey - Orange MDL palette set.

So, making some adjustments i was able to fix this.

First, changing config.toml:

  mdlPrimary = "red" 
  mdlAccent = "indigo"

and in header.html

<!-- Allow user to choose MDL theme -->
    {{- if .Site.Params.mdlPrimary }}
        {{- $.Scratch.Set "mdlPrimary" .Site.Params.mdlPrimary }}
    {{- else }}
        {{- $.Scratch.Set "mdlPrimary" "grey" }}
    {{- end }}
    {{- if .Site.Params.mdlAccent }}
        {{- $.Scratch.Set "mdlAccent" .Site.Params.mdlAccent }}
    {{- else }}
        {{- $.Scratch.Set "mdlAccent" "orange" }}
    {{- end -}}

I'm not really sure if this is a problem with the version of hugo im using (v0.19 windows x64) or if is another issue, but anyway, changing this i was able to made the palette changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions