A docsify.js plugin to simplify the color selection for docsify-themeable.
Note
Sorry for not providing a demo, but I thought this is a very self explanatory setup. But I am using this activly in another projects.
How to install this plugin:
- Make sure you have docsify-themeable installed.
- Copy one of the stylesheet segments from below and copy it into the
head
section yourindex.html
file. Make sure that is is after all other plugins and before your own modifications. - Copy the color-files from the example directory into your projects
_css/
folder. - Change the colors in those files to your liking.
For production, please use the numbered version to prevent breaking changes in production.
<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="./_css/colors-dark.css">
<link rel="stylesheet" media="(prefers-color-scheme: light)" href="./_css/colors-light.css">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/main.min.css">
If you are developing on a doc, you can use the latest. Make sure you switch it to production later, or the production one right away.
<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="./_css/colors-dark.css">
<link rel="stylesheet" media="(prefers-color-scheme: light)" href="./_css/colors-light.css">
<link rel="stylesheet" href="https://unpkg.com/docsify-simple-themeable@latest/dist/main.min.css">
- This project is inspired by the color pallet naming scheme of daisyUI: You can use their theme generator to select colors.
- If you think something on your docs should have a different color. You are more then welcome to copy the
src/main.css
into your_css
folder as well. Just make sure you don't forget to adjust hte link in in thehead
section of yourindex.html
! - If you already have a css files, you are free to change the folder location in the stylesheet references in
index.html
. - If you need additional fixes, feel free to copy my css file from this repo.
I'm always happy, if someone has improvements to this little plugin. If you want to help, anything goes, but preferred is what is on the roadmap below or maybe discuss it as a GitHub issue first. ^^
Nothing much here, but I'm planning to add the following features at some point:
- Remove requirement for docsify-themeable.
This repo is using the MIT license.
Thanks to the docsify.js team to make changing CSS so simple. I usually don't front end, but this was a breeze to get working.