zillionare / python-project-wizard

A tool for creating skeleton python project, built with popular develop tools and conform to best practice.
https://zillionare.github.io/python-project-wizard/
BSD 3-Clause "New" or "Revised" License
123 stars 104 forks source link

mkdocs colour toggle option #3

Closed ashnair1 closed 3 years ago

ashnair1 commented 3 years ago

Description

Hi I was trying to setup a dark mode light mode toogle as per the mkdocs documentation so I basically replaced the following in mkdocs.yml

   palette:
     primary: light blue

with this

  palette:
    - scheme: default
      primary: indigo
      accent: indigo
      toggle:
        icon: material/toggle-switch-off-outline
        name: Switch to dark mode
    - scheme: slate
      primary: red
      accent: red
      toggle:
        icon: material/toggle-switch
        name: Switch to light mode

However, this doesn't work and the toggle is not displayed. Do you have an idea as to why this happens?

ashnair1 commented 3 years ago

Found the issue. My toggle less page was getting cached. Just needed to clear the browser history.

zillionare commented 3 years ago

Thanks for update this info.