liwugang / liwugang.github.io

blog
https://liwugang.github.io/
MIT License
1 stars 2 forks source link

深入理解 SELinux - liwugang #30

Open liwugang opened 4 years ago

liwugang commented 4 years ago

https://liwugang.github.io/2020/10/03/selinux_all.html

本文为 SELinux 专辑,记录相关文章。

im-Kitsch commented 2 years ago

作者置顶【置顶】的红字怎么整出来的呀

liwugang commented 2 years ago

文章中使用 sticky: true 进行了配置 你可以看下用到的插件:https://liwugang.github.io/2020/10/02/blog_sticky.html

im-Kitsch commented 2 years ago

谢谢解释呀,但是我想问的主要是怎么实现置顶的文章显示有“置顶”两个字,在文章中只是提到了增加这个功能,但是没有讲怎么添加的。所以想问一下。

liwugang commented 2 years ago

添加的地方: 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 -%}