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

add issues-api and friends tag-plugin #229

Closed
wants to merge 1 commit into from
Closed

add issues-api and friends tag-plugin #229

wants to merge 1 commit into from

Conversation

xaoxuu
Copy link

@xaoxuu xaoxuu commented Mar 12, 2021

PR Checklist

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

PR Type

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

What is the current behavior?

Issue resolved:

What is the new behavior?

  • Link to demo site with this changes:
  • Screenshots with this changes:

How to use?

In NexT _config.yml:

issues_api: https://issues-api.vercel.app/v1/

In blog markdown file (example):

{% friends repo:xaoxuu/friends %}

iShot2021-03-12 21 11 17

@welcome
Copy link

welcome bot commented Mar 12, 2021

Thanks so much for opening your first PR here!

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@stevenjoezhang
Copy link
Member

The function of the friends tag is similar to the existing link-grid, I suggest make it as another style of link-grid.

@xaoxuu
Copy link
Author

xaoxuu commented Mar 14, 2021

In my opinion, the usage and style of both of them are very different.

linkgrid:

{% linkgrid %}
Theme NexT | https://theme-next.js.org/ | Stay Simple. Stay NexT. | /images/apple-touch-icon-next.png
Theme NexT | https://theme-next.js.org/ | Stay Simple. Stay NexT. | /images/apple-touch-icon-next.png
Theme NexT | https://theme-next.js.org/ | Stay Simple. Stay NexT. | /images/apple-touch-icon-next.png
Theme NexT | https://theme-next.js.org/ | Stay Simple. Stay NexT. | /images/apple-touch-icon-next.png
% Theme NexT | https://theme-next.js.org/ | Stay Simple. Stay NexT. | /images/apple-touch-icon-next.png
{% endlinkgrid %}

but friends tag:

{% friends repo:xxx/xxx %}

@stevenjoezhang
Copy link
Member

The data in data.json contains almost the same information as the current link-grid tag. At this point, I think the functions of the two tag plugins are similar.

@@ -26,5 +26,8 @@ hexo.extend.helper.register('js_vendors', function() {
if (theme.pangu) {
vendors.push('pangu');
}
if (theme.issues_api) {
vendors.push('jquery');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不应该这样引入jQuery的,同时开了fancybox可能会出错,因为那边也有jQuery

@ljcbaby
Copy link
Member

ljcbaby commented Apr 8, 2021

This way of loading information from files has merit compared to styles, allowing faster updating of friend link information rather than regeneration, and allowing submitters to maintain the information themselves (via Github, etc.)

English is not my native language; please excuse typing errors.

@pplmx
Copy link

pplmx commented Apr 8, 2021

Look forward to this feature.

@PaperStrike
Copy link
Member

I think it's better to extend the exsisting usage of link-grid, making it possible to mix the one-by-one grammer with your grammer together. Since % is considered as the comment symbol, you may try to make something implemented as:

{% linkgrid %}
Theme NexT | https://theme-next.js.org/ | Stay Simple. Stay NexT. | /images/apple-touch-icon-next.png
% friends example/friends
{% endlinkgrid %}

Possibly more sources together:

{% linkgrid %}
Theme NexT | https://theme-next.js.org/ | Stay Simple. Stay NexT. | /images/apple-touch-icon-next.png
% friends example/friends
% friends example2/friends
{% endlinkgrid %}

@xaoxuu
Copy link
Author

xaoxuu commented Apr 8, 2021 via email

@ljcbaby ljcbaby mentioned this pull request Apr 15, 2021
3 tasks
@ljcbaby ljcbaby linked an issue Apr 15, 2021 that may be closed by this pull request
3 tasks
@xaoxuu xaoxuu closed this May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Load linkgrid metadata from files
6 participants