New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

docsify-dark-mode

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docsify-dark-mode

Enables dark mode for your docsify docs

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
36
-23.4%
Maintainers
1
Weekly downloads
 
Created
Source

docsify-dark-mode

This is docsify plugin which enables dark mode for your docsify site

JavaScript Style Guide

Installation

Add the following stylesheet along with your other stylesheets

<link
  rel="stylesheet"
  href="//cdn.jsdelivr.net/npm/docsify-dark-mode@latest/dist/style.css"
/>

And add the following script

<script src="https://cdn.jsdelivr.net/npm/docsify-dark-mode@latest/dist/index.js"></script>

Configure

In your docsify config object add the following

window.$docsify = {
...
darkMode : {
  dark: {
    background: '',
    toggleBtnBg: '',
    textColor: ''
  },
  light: {
    background: '',
    toggleBtnBg: '',
    textColor: ''
  }
}
...
}

Default options

dark: {
  background: '#1c2022',
  toggleBtnBg: '#34495e',
  textColor: '#b4b4b4'
},
light: {
  background: 'white',
  toggleBtnBg: 'var(--theme-color)',
  textColor: 'var(--theme-color)'
}

Thanks it, Now enjoy :tada: your dark mode in your docsifysite

Screen Shot

Button (in light mode)

ss

Button (in dark mode)

ss

docsify page (ligth mode)

ss

docsify page (dark mode)

ss

Contribution Guide

  • Clone the repo
  • start editing on src/index.js and src/style.css
  • The build step using
    • Optimize the generated style using cssnano and postcss
    • Build the javascript using rollup
    • optimize it using rollup-plugin-terser
    • styling rule using standard

Keywords

docsify

FAQs

Package last updated on 21 Feb 2020

Related posts