Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract leancloud-counter to plugins (An example of #663) #677

Merged
merged 1 commit into from Mar 18, 2019

Conversation

@LEAFERx
Copy link
Contributor

LEAFERx commented Mar 11, 2019

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines.
  • Tests for the changes was maked (for bug fixes / features).
    • Muse | Mist have been tested.
    • Pisces | Gemini have been tested.
  • (NOT YET)Docs in NexT website have been added / updated (for new features).

PR Type

What kind of change does this PR introduce?

  • Bugfix.
  • Feature.
  • Code style update (formatting, local variables).
  • Refactoring (no functional changes, no api changes).
  • Build related changes.
  • CI related changes.
  • Documentation content changes.
  • Other... Please describe:

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?

In NexT _config.yml:

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?

  • Yes.
  • No.
@LEAFERx LEAFERx requested review from stevenjoezhang, ivan-nginx and maple3142 and removed request for stevenjoezhang and ivan-nginx Mar 11, 2019
@LEAFERx LEAFERx added this to the v7.1.0 milestone Mar 12, 2019
@sli1989

This comment has been minimized.

Copy link
Collaborator

sli1989 commented Mar 12, 2019

No information about the configuration of leancloud_counter?
api_id: config.leancloud_counter.app_id

@stevenjoezhang

This comment has been minimized.

Copy link
Member

stevenjoezhang commented Mar 12, 2019

How about uploading it to npmjs.org? Like https://www.npmjs.com/package/hexo-leancloud-counter-security

@LEAFERx

This comment has been minimized.

Copy link
Contributor Author

LEAFERx commented Mar 12, 2019

No information about the configuration of leancloud_counter?
api_id: config.leancloud_counter.app_id

The config is done in plugin config (that is root _config.yml not theme _config.yml).
Like I said, I am working on perfecting this plugin and the document. But I am busy in weekdays(qaq) so it may take some time.

How about uploading it to npmjs.org? Like https://www.npmjs.com/package/hexo-leancloud-counter-security

checkout https://www.npmjs.com/package/hexo-leancloud-counter

@ivan-nginx

This comment has been minimized.

Copy link
Member

ivan-nginx commented Mar 17, 2019

So, as I right understand, no need to add in theme:

  • Settings
  • Swig templates (if exists)
  • CSS templates (if exists)

Only in plugin (Hexo's config) all settings will be? Right?

@LEAFERx

This comment has been minimized.

Copy link
Contributor Author

LEAFERx commented Mar 17, 2019

So, as I right understand, no need to add in theme:

  • Settings
  • Swig templates (if exists)
  • CSS templates (if exists)

Only in plugin (Hexo's config) all settings will be? Right?

Yes, themes only need to integrate them and manage them (which to show, etc.)

@LEAFERx LEAFERx merged commit fe9af86 into theme-next:master Mar 18, 2019
3 checks passed
3 checks passed
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@LEAFERx

This comment has been minimized.

Copy link
Contributor Author

LEAFERx commented Mar 18, 2019

Sorry for the misoperation. Continue to #707 .

@ivan-nginx ivan-nginx removed this from the v7.1.0 milestone Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.