-
Notifications
You must be signed in to change notification settings - Fork 2k
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 comment text #186
Add comment text #186
Conversation
No. In some comments (e.g. Disqus) label «Comment(s)» added automatically. Check it. |
i have thought about disqus as exception. facebook and changyan comment are needed to check. |
Confirm in all existed comment systems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, i think need to add in post meta or somewhere:
If mobile style - icon only, without label.
And second: 1 comment, 2 comment(s) — how about this?
layout/_macro/post.swig
Outdated
@@ -136,7 +136,7 @@ | |||
<i class="fa fa-comment-o"></i> | |||
</span> | |||
<a href="{{ url_for(post.path) }}#comments" itemprop="discussionUrl"> | |||
<span class="post-comments-count fb-comments-count" data-href="{{ post.permalink }}" itemprop="commentCount">0</span> comments | |||
<span class="post-comments-count fb-comments-count" data-href="{{ post.permalink }}" itemprop="commentCount">0</span> Comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about here? It is not translated text?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, it's a mistake. I will fix it.
At present, it follows the display rules of Post meta display settings. The text will not display in mobile. Lines 250 to 257 in 1975fd0
hexo-theme-next/source/css/_common/components/post/post-meta.styl Lines 38 to 45 in 9d46733
The disqus comment returns '* Comments' automatically. I think it's hard to unify them. Other comment systems can suit the singular and plural forms according to the tags/categories count. hexo-theme-next/languages/_en.yml Lines 56 to 60 in 1975fd0
|
Yes, it is. I'm talking about this at the begining of this pull. And impossible to resolve how many comments count will and there is bug in languages:
About Chinese IDK, but i think there is 2 variants, like in EN language. So, how about this? |
I don't know how to get the element of comment count, for valine: |
Nohow. 😄 This is 3rd-party JS applications with dynamic values changing, NexT can't resolve this data during generate. I suggest something like: So, it will be:
|
Can the comment number be counted like this? hexo-theme-next/layout/page.swig Lines 33 to 41 in 95cd9e1
|
They can be counted like this, yep. But only if it's internal NexT or Hexo plugin(s). Comments services are external. |
MB symbol hexo-theme-next/languages/_en.yml Line 94 in 1975fd0
|
OK, set the text in or out of hyperlink ? |
Replace |
I say the style of text. Comments: 1 or Comments: 1 |
Oh. IDK. See as will be better. FB comments was out of the link. |
Let's see how in Wordpress? It seems in WP used second variant: Comments: 1. |
Within the hyperlink. That's it. |
Yep, i see. Nice! |
* Add comment text * Update the comment text in hyperlink * Update comment text's style * Add symbol.colon in comment text
* Add comment text * Update the comment text in hyperlink * Update comment text's style * Add symbol.colon in comment text
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
At present, there is a loss in comment text.
Facebook comments has added already (example).
https://github.com/sli1989/hexo-theme-next/blob/e6d4dd5ad7f178708754e0bab01863f267c7a900/layout/_macro/post.swig#L139
Disqus auto return the
Comments
: 1 Comment example, 2 Comments , 6 CommentsHypercomments (example) & changyan (example) & valine & gitment are needed to add comment text.
gitment example
Issue Number(s): N/A
What is the new behavior?
To keep consisting of disqus comment (auto display), the style of
commentCount+Comments
in<a </a>
as hyperlink is added in hypercomments/changyan/gitment/valine. And changecomments
toComments
in facebook comments.valine
How to use?
In NexT
_config.yml
:Does this PR introduce a breaking change?