docsify-print

1.0.0-alpha.0 • Public • Published

docsify-print

This is a docsify plugin which adds a print button to 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-print@latest/dist/style.css"
/>

And add the following script

<script src="https://printjs-4de6.kxcdn.com/print.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify-print@latest/dist/index.js"></script>

Change the position of the button

The print document label is position using absolute positioning and values are passed as CSS var. You can change the position by changing the value of the css var

css var used with default values are

--docsify-print-top: 0;
--docsify-print-left: unset;
--docsify-print-right: unset;
--docsify-print-bottom: unset;

Thats it, Now enjoy 🎉 your dark mode in your docsifysite

Screen Shot

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

Package Sidebar

Install

npm i docsify-print

Weekly Downloads

0

Version

1.0.0-alpha.0

License

MIT

Unpacked Size

4.95 kB

Total Files

4

Last publish

Collaborators

  • anixsaha