paulmartins / hugo-digital-garden-theme

Hugo Theme for digital gardening projects.
MIT License
89 stars 43 forks source link

Default to dark mode? #11

Closed not-napoleon closed 1 year ago

not-napoleon commented 1 year ago

Not sure if this is a feature request, or just something I couldn't figure out how to do. I would like to set the theme to automatically open in dark mode, while leaving the toggle available for folks who prefer light mode. Thanks!

paulmartins commented 1 year ago

The info below should help you with witch the default theme to dark mode. It is not ideal to modify directly the theme files and a better approach would be to have a parameter to configure it in the .toml file but I'll need to look at that at a later time. Of course you're welcome to submit a pull request if you feel like you can work it out 🙂

Note: I used this blog post to implement the dark mode.

Hope it helps, Paul

not-napoleon commented 1 year ago

Cool, thanks, I'll take a look. I agree a parameter to configure it would make the most sense; I'll try to see if I can make that happen and send a PR. I'm still a real newbie at Hugo themes, but hopefully I can figure it out. Thanks for showing me where to start.

paulmartins commented 1 year ago

Did you managed to get the default dark mode in the end ? If so would you be happy if I closed this ?

not-napoleon commented 1 year ago

I got swamped at my day job and caught covid (I'm mostly recovered), so actually haven't had a chance to look at this since I last replied. That said, if you want to close it that's fine with me. I think I have the information I need to do what I want. I still hope to submit a PR for enabling dark mode by default, as soon as I get some time to work on it.

paulmartins commented 1 year ago

Sorry to hear that. Good to know you are feeling better. Don't worry there is no rush, I was just doing some repo housekeeping. I can leave that open for now.