Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Extract leancloud-counter to plugins (An example of #663) #677
Please check if your PR fulfills the following requirements:
What kind of change does this PR introduce?
What is the current behavior?
leancloud-counter's swig is embedded in NexT
What is the new behavior?
leancloud-counter is fully extracted as independent plugin.
An example of #663
How to use?
leancloud_visitors: enable: true
Further config is and should be done in plugin config.
The plugin is https://github.com/theme-next/hexo-leancloud-counter/
For now, this Pull Request is not hush to be merged since this plugin is just a prototype. I will complete it soo. But actually this plugin can work for now. Also, document will be add soon.
This PR shows my idea about how to make NexT more simple and pluggable.
Does this PR introduce a breaking change?
How about uploading it to npmjs.org? Like https://www.npmjs.com/package/hexo-leancloud-counter-security
The config is done in plugin config (that is root _config.yml not theme _config.yml).
Yes, themes only need to integrate them and manage them (which to show, etc.)