hexo-widget-tree

0.2.2 • Public • Published

hexo-widget-tree

npm

中文文档

Demo

Tree preview widget for hexo.

(If your theme supports ajax, it can achieve refreshless browsing)

Usage

npm install hexo-widget-tree
# yarn add hexo-widget-tree

Click the middle button on the left of the page to expand the "tree" menu.

Click the folder with the + icon to expand the menu. By clicking the folder name, you will be redirect to category page.

Options

  • cdn: true, default jsdelivr CDN.
  • hide: false, automatically hides unless you move the mouse to the middle of the left part of the page.
  • layout: Which page will code snippets being injected. More info see Injector | hexo.
  • showCount: Show number of posts in category.
  • toc: More info here.
    • enable: false, display toc for post
# You don't have to configure them.
widget_tree:
  cdn: false
  hide: false
  layout: default
  # layout:
  #   - home
  #   - page
  showCount: true
  toc:
    enable: false
    # max_depth:
    # min_depth:
    # list_number:

Features

  • Adapt for dark mode

You need data-user-color-scheme="dark" in parent node.

Dev

git clone https://github.com/YunYouJun/hexo-widget-tree

cd hexo-widget-tree
# install dependencies
npm install
npm link

# watch sass to compile
npm run dev

# start your hexo
cd your-hexo-blog
npm link hexo-widget-tree
hexo s
# We have to reload hexo server when plugin is modified.

Readme

Keywords

none

Package Sidebar

Install

npm i hexo-widget-tree

Weekly Downloads

6

Version

0.2.2

License

MIT

Unpacked Size

20.6 kB

Total Files

10

Last publish

Collaborators

  • yunyoujun