Skip to content

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

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

Merged
merged 1 commit into from
Mar 18, 2019
Merged

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

merged 1 commit into from
Mar 18, 2019

Conversation

LEAFERx
Copy link
Contributor

@LEAFERx 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.

Sorry, something went wrong.

@LEAFERx LEAFERx requested review from stevenjoezhang, ivan-nginx and maple3142 and removed request for stevenjoezhang and ivan-nginx March 11, 2019 13:47
@LEAFERx LEAFERx added this to the v7.1.0 milestone Mar 12, 2019
@sli1989
Copy link
Collaborator

sli1989 commented Mar 12, 2019

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

@stevenjoezhang
Copy link
Contributor

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

@LEAFERx
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
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
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
@LEAFERx
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
rjyblog pushed a commit to rjyblog/hexo-theme-next that referenced this pull request Oct 17, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants