ppoffice / hexo-component-inferno

A collection of Inferno.js layout components and utility scripts for Hexo
https://ppoffice.github.io/hexo-component-inferno/
24 stars 30 forks source link

make tags widget configurable from _config.icarus.yml #45

Closed ppwwyyxx closed 2 years ago

ppwwyyxx commented 2 years ago

This PR allows users to configure the tags widget in _config.icarus.yml like this, similar to the toc widget:

    -
        position: left
        type: toc
        index: false
        collapsed: false
        depth: 3  # show up to h3
    -
        position: left
        type: tags
        order_by: "-length"

With the above config, it renders like this: 2022-05-19_04-08

Note that the tags in the widget are now sorted accordingly. Meanwhile, the body of /tags page still works and its content remains unchanged (it would be good to change it accordingly as well, but that's out of the scope of this PR).

This PR follows what's done in https://github.com/ppoffice/hexo-component-inferno/commit/08dd85fa049e02bee9880ad26f2e8f4bb66e882d.

ppwwyyxx commented 2 years ago

Thanks for your suggestion. Comments are addressed