Open liwugang opened 4 years ago
作者置顶【置顶】的红字怎么整出来的呀
文章中使用 sticky: true 进行了配置 你可以看下用到的插件:https://liwugang.github.io/2020/10/02/blog_sticky.html
谢谢解释呀,但是我想问的主要是怎么实现置顶的文章显示有“置顶”两个字,在文章中只是提到了增加这个功能,但是没有讲怎么添加的。所以想问一下。
添加的地方: https://github.com/liwugang/liwugang.github.io/blob/source/_includes/article-list.html#L63
<div class="item__content"> {%- if _article.sticky == true -%} <header><a href="{{ _article_url }}"><h2 itemprop="headline" class="item__header"><font color="#EE0000">[置顶]</font>{{ _article.title }}</h2></a></header> {%- else -%} <header><a href="{{ _article_url }}"><h2 itemprop="headline" class="item__header">{{ _article.title }}</h2></a></header> {%- endif -%}
https://liwugang.github.io/2020/10/03/selinux_all.html
本文为 SELinux 专辑,记录相关文章。