Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Light/Dark theme toggle doesn't work #16

Closed
kstr0git opened this issue Mar 22, 2023 · 3 comments
Closed

Light/Dark theme toggle doesn't work #16

kstr0git opened this issue Mar 22, 2023 · 3 comments

Comments

@kstr0git
Copy link

Describe the bug
After having deployed the site, to a VPS via NGINX and testing I noticed that I was unable to toggle the theme. It seems to work locally when running hugo serve however when building and deploying this toggle is functionless. The main.min.generatedString.css file within the sass folder only shows the varient for dark-theme at the bottom, I'm not sure if this is expected. I've cleared my browser cache and opened the site in a private window so I know it's some kind of issue in the generation of the static files.

Following the guide in this repo, it doesn't seem like I have done anything incorrect in this config and install process.

Device information (please complete the following information):

  • OS: Windows 10
  • Browser: Firefox
@hugo-sid
Copy link
Owner

hugo-sid commented Mar 22, 2023

Hi @kstr-0. Thanks for taking time to open this issue.

I am unable to reproduce this issue, since I don't have access to a server. I have a demo site (link available on GitHub) that gets deployed to Netlify without any error.

Can you provide some URL or public IP of the server for further analysis ?

I have a question for you just out of curiosity. The main advantage of static site generators (like Hugo) is that they can generate static webpages. These pages can now be easily made available online without any need of server management. But you seem to be using server to serve your Hugo websites. Why ?

@kstr0git
Copy link
Author

Hello @hugo-sid! I may have opened this ticket too prematurely and would like to apologies for that. The problem appeared to be that I was missing the s in my baseURL for https. I think the TLS certificate was causing the problems here so I apologies.

As for your question to myself. I'm using github actions to deploy my static site though github to my VPS so I don't need to worry about having Hugo installed on my other machines when looking to make changes. It also means I don't need to copy my SSH keys between the different machines I own.

I can now close this as the issue has been solved by properly updating the URL within the baseURL of the config.toml!

@hugo-sid
Copy link
Owner

Hello @kstr-0 .

I may have opened this ticket too prematurely and would like to apologies for that.

No worries Kieran, it's fine.

The problem appeared to be that I was missing the s in my baseURL for https. I think the TLS certificate was causing the problems here so I apologies.

I'm glad you could sort it out yourself.

Don't forget to star the repo, if you liked this theme.

I suggest you to use this theme as a Git submodule, so that you can receive feature updates/bug fixes.

Happy blogging 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants