Feature: related posts, according to #67#109
Conversation
wafer-li
left a comment
There was a problem hiding this comment.
Provide i18n for Related Posts field.
| padding: 0; | ||
|
|
||
| &:before { | ||
| content: hexo-config('related_posts.title') || 'Related Posts'; |
There was a problem hiding this comment.
I think it is better to provide i18n for the Related Posts(ie. Related Posts -> 相关文章 in language zh-CN)
@tsanie there are similar issues:
|
…home page, and add support to i18n.
tsanie
left a comment
There was a problem hiding this comment.
Add a switch related_posts.display_in_home to determine whether related posts will be shown in the home page.
And a language item post.related_posts, need to sync to crowdin and translate it.
Live demo updated: https://tsanie.us (the configure related_posts.display_in_home is setting to false, now it will be only shown in the post page)
| margin-left: 2em; | ||
| .popular-posts-title { | ||
| display: block; | ||
| h3 { |
There was a problem hiding this comment.
H3 here? And if will seo false and then main title will H1 and no headers will used — H1-H3 space?
There was a problem hiding this comment.
@ivan-nginx It is generated by the plugin (https://github.com/theme-next/hexo-theme-next/pull/109/files#diff-0e030eb6dd7b9d25bfcba06bc8ea5609R337), otherwise, do we need to custom the template?
There was a problem hiding this comment.
H3 in the bottom bad for SEO. For example, if SEO will true and we will have:
H1 (site_subtitle)
H2 (title)
H3
H4
H5
H3
H4
H3 (related_posts)
It's already fine with SEO. But if SEO false, then we can get fine result:
H1 (title)
H2
H3 (related_posts)
But we also may get bad result:
H1 (title)
???
H3 (related_posts)
So, with SEO disabled & releated_posts enabled user can totally break his seo.
Headers can go forward only seriatim. And can go back with any new position (header reseting). They can't go forward bigger then 1 or more step (e.g. H4 header and after H6).
hexo-theme-next/source/css/_schemes/Gemini/index.styl
Lines 131 to 160 in 82ac7af
| {{ post.content }} | ||
| {% endif %} | ||
| </div> | ||
|
|
There was a problem hiding this comment.
So many for now. oO Mb move to external swig file?
Like post-copyright.swig.
There was a problem hiding this comment.
@ivan-nginx OK, seems now it need to be move to the single file.
|
use the custom template to generate the output, removal the |
wafer-li
left a comment
There was a problem hiding this comment.
Everything is fine.
Except for the i18n translations, we could use the crowdin to fix it.
|
|
|
@sli1989 Of course, need to follow the dependencies described in the _config.yml |
Feature: related posts, according to theme-next#67


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?
Not an issue but according to the feature in roadmap.
By using the hexo-related-popular-posts that mentioned in the iissnan/hexo-theme-next#1130
Issue Number(s): #67
What is the new behavior?
When the user have enable the feature, the related posts will be shown in the bottom of the post.
Screens with this changes:

Link to demo site with this changes: https://tsanie.us/2018/01/07/replace-destiny-child-character-next/
How to use?
In NexT
_config.yml:Does this PR introduce a breaking change?