Anatole: Unable to Switch From Dark to Light

Created on 13 Feb 2021  路  6Comments  路  Source: lxndrblz/anatole

Describe the bug
I am unable to toggle between light and dark modes on my website.

To Reproduce
Steps to reproduce the behavior:

  1. Click the icon in the navbar for toggling themes.
  2. The theme should swap to light mode.

Expected behavior
The theme should be able to be toggled between light and dark mode.

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows 10
  • Browser [e.g. chrome, safari] Firefox
  • Version of the Theme

    • most recent from master

  • Version of Hugo (run a hugo version if unsure)
    0.80
bug

All 6 comments

Hi there,

I just cloned your repo and tried it locally. I was able to reproduce the same problem.

Adjust your makefile from:
hugo server -D --navigateToChanged --verbose --layoutDir=layouts/anatole
to
hugo server -D --navigateToChanged --verbose

The layoutDir parameter shouldn't be necessary because you already defined the theme in the config.toml.

Thanks!

I was trying to fix the date formatting and such I used (since I have several custom layouts in the layouts/anatole dir) - while removing the layoutDir=layouts/anatole section from the Makefile fixed the theme switching issue, now I'm unable to use any of my custom layouts. Do you have any ideas?

For some reason the layouts directory had gotten deleted from the remote. Re-adding that fixed it. No idea why it had gotten deleted, but it did.

For some reason it's started acting up again - I have no idea why. I'm so sorry about the back and forth here.

For some reason it was somethingin my head.html file. No idea what could have caused it, but for some reason I fixed it. Sorry again!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sptandi picture Sptandi  路  4Comments

shariq1989 picture shariq1989  路  3Comments

xiangli2pro picture xiangli2pro  路  3Comments

xiangli2pro picture xiangli2pro  路  5Comments

ivnvitx picture ivnvitx  路  3Comments