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

Integrate hexo-recommended-posts plugin #2054

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -227,6 +227,11 @@ post_wordcount:
totalcount: false
separated_meta: true

# Recommended posts
# Dependency: https://github.com/huiwang/hexo-recommended-posts
recommended_posts:
enabled: false

# Wechat Subscriber
#wechat_subscriber:
#enabled: true
@@ -41,6 +41,7 @@ post:
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'
recommended_posts: Recommended Posts

page:
totally: Totally
@@ -35,6 +35,7 @@ post:
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'
recommended_posts: articles Recommandées

page:
totally: Total
@@ -40,6 +40,7 @@ post:
license_title: 版权声明
license_content: '本博客所有文章除特别声明外,均采用
<a href="%s" rel="external nofollow" target="_blank">%s</a> 许可协议。转载请注明出处!'
recommended_posts: 推荐文章

page:
totally: 共有
@@ -334,6 +334,12 @@
{### END POST BODY ###}
{#####################}

{% if theme.recommended_posts.enabled and not is_index %}
<div>
{% include 'recommended_posts.swig' with {post: post, site: site} %}
</div>
{% endif %}

{% if theme.wechat_subscriber.enabled and not is_index %}
<div>
{% include 'wechat-subscriber.swig' %}
@@ -0,0 +1,11 @@
<div class="recommended_posts">
{% set recommended_posts = recommended_posts(post, site) %}
{% if recommended_posts.length > 0 %}
<h1>{{ __('post.recommended_posts') }} </h1>
<ul>
{% for link in recommended_posts %}
<li><a href="{{ link.permalink }}">{{ link.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
</div>
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.