-
Notifications
You must be signed in to change notification settings - Fork 109
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
Adding Dark Mode to Your Franklin Website! #958
Labels
Comments
This is not necessary Franklin related, but if you use
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After some tinkering and help from @fredrikekre and @kdheepak, I am pleased to say I have found a way to bring darkmode to Franklin templates!
This details how to add darkmode.js to a Franklin website which should "just work ™️" with Franklin's templates:
_libs/darkmode
where you create the folderdarkmode
_layout
, openhead.html
and add the following snippet in the<head>
block (I suggest adding it after the CSS stylesheets):_css/franklin.css
file for styling but you could do something different:And once you are done, you should now have darkmode enabled for your website with a nice floating widget that you can click and reposition anywhere!
Here are some screenshots of my site:
I hope this helps with adding Darkmode to your website!
~ tcp 🌳
P.S. Also, you for the script to work on your site, you may have to set
optimize(minify = false)
in your.github/workflows/deploy.yml
file.The text was updated successfully, but these errors were encountered: