Hexo-theme-next: 怎么在每篇文章下面都增加作者功能?

Created on 16 Jul 2017  ·  6Comments  ·  Source: iissnan/hexo-theme-next

请问我想在每个文章下面都增加作者,就和“分类”功能一样,请问我该怎么修改源码来实现?

Most helpful comment

1.you can add author in
theme/next/ layout/post.swig
before
'{% if post.comments %}'
add
<span> | </span><span class="fa fa-user-o"> </span><span style="color:#222;"> {{ post.author }}</span>
2.and than add 'author: xx' in title of
source/_posts/xx.md
like this

layout: post
title: add author
date: 2001-08-25
author: author name
category: add author
tag: next
---

All 6 comments

可以考虑自己来实现这个功能吧,应该挺简单的。

@weixingdeng if solved, close it.

好像开启那个版权声明就带有作者了吧?

请开启主题配置下的 post_copyright 字段开启。

1.you can add author in
theme/next/ layout/post.swig
before
'{% if post.comments %}'
add
<span> | </span><span class="fa fa-user-o"> </span><span style="color:#222;"> {{ post.author }}</span>
2.and than add 'author: xx' in title of
source/_posts/xx.md
like this

layout: post
title: add author
date: 2001-08-25
author: author name
category: add author
tag: next
---

Added in #1898 (PART 5).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DVD0423 picture DVD0423  ·  3Comments

dev-fancyluo picture dev-fancyluo  ·  3Comments

iTofu picture iTofu  ·  4Comments

ifgao picture ifgao  ·  4Comments

YorksonChang picture YorksonChang  ·  3Comments