惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
大猫的无限游戏
大猫的无限游戏
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 司徒正美
美团技术团队
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
WordPress大学
WordPress大学
T
Tailwind CSS Blog
U
Unit 42
C
Check Point Blog
S
SegmentFault 最新的问题
Martin Fowler
Martin Fowler
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
腾讯CDC
罗磊的独立博客
小众软件
小众软件
Recent Announcements
Recent Announcements
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
DataBreaches.Net

姓王者的博客

Linux用户Secure Boot自主维护指南 | 姓王者的博客 MAD Bugs 已经开始——关于信息安全的军备竞赛 | 姓王者的博客 解决钉钉Dingtalk无法在Linux新版内核上启动问题-修复可执行栈错误 | 姓王者的博客 突发:GitHub 正遭受大规模 Issue 赌博广告轰炸 | 姓王者的博客 Ubuntu26.04-beta体验:坚毅浣熊! | 姓王者的博客 fakeclaw装作龙虾发贴吧 | 姓王者的博客 找回12年前的QQ记忆 | 姓王者的博客 在Linux上玩Flash网页游戏-洛克王国 | 姓王者的博客 Copilot将使用交互数据来训练 | 姓王者的博客 重要通知-请更新我的GPG公钥 | 姓王者的博客 为了自由Android | 姓王者的博客 GPL"2,3"事 | 姓王者的博客 短文-对VitePlus的一点🤏小贡献 | 姓王者的博客 Bing收录没了?亲测有效的快速恢复指南 | 姓王者的博客 解决桌面设备二维码快速识别的工具-ClipQR | 姓王者的博客 解决 Nautilus 自定义终端插件安装依赖问题 | 姓王者的博客 OpenClaw 该熄火了 | 姓王者的博客 Vite8 - 统一的基建开始 | 姓王者的博客 Astro 6 推出啦 | 姓王者的博客 ubuntu的openvpn异常暂停推送更新 | 姓王者的博客 Ubuntu 24.04 安装 Win10 虚拟机 | 姓王者的博客 ESA-后记:热爱阿里云 | 姓王者的博客 Moonbit 0.8.0 重大发布,我也要改一下我的包 | 姓王者的博客 ESA Pages 边缘开发大赛获奖 | 姓王者的博客 Astro: 优化katex,mermaid和灯箱使用 | 姓王者的博客 从edgeone迁移到esa | 姓王者的博客 出租人类:AI时代的荒诞与真实 | 姓王者的博客 Astro 5.17构建性能优化实践:从18s到13s | 姓王者的博客 Moonbit License Checker 开发使用 | 姓王者的博客 Stalux Astro博客主题自荐 | 姓王者的博客
hexo创建一个友情链接页面 | 姓王者的博客
作者:xingwangzhe · 2024-09-14 · via 姓王者的博客

🕒 阅读时间:2 分钟 📝 字数:700 👀 阅读量: Loading...

尽管hexo自带links功能,但是这样看起来单一无趣,那么为了改善友链,我们可以自定义一个页面

创建新页面

找到你的本地博客位置,输入 hexo new page 友情链接 你的本地博客目录就会出现blog\source\友情与链接\index.md 打开文件 发现空空如也

---

title: 友情与链接

date: 2024-09-12 20:35:40

---

添加代码

如下一大长串

---

title: 友情与链接

date: 2024-09-12 20:35:40

---

## **友情链接**

<div class="post-body">

<div id="links">

<style>

.links-content{

margin-top:1rem;

}

.link-navigation::after {

content: " ";

display: block;

clear: both;

}

.card {

width: 45%;

font-size: 1rem;

padding: 10px 20px;

border-radius: 4px;

transition-duration: 0.15s;

margin-bottom: 1rem;

display:flex;

}

.card:nth-child(odd) {

float: left;

}

.card:nth-child(even) {

float: right;

}

.card:hover {

transform: scale(1.1);

box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);

}

.card a {

border:none;

}

.card .ava {

width: 3rem!important;

height: 3rem!important;

margin:0!important;

margin-right: 1em!important;

border-radius:4px;

}

.card .card-header {

font-style: italic;

overflow: hidden;

width: 100%;

}

.card .card-header a {

font-style: normal;

color: #2bbc8a;

font-weight: bold;

text-decoration: none;

}

.card .card-header a:hover {

color: #d480aa;

text-decoration: none;

}

.card .card-header .info {

font-style:normal;

color:#a3a3a3;

font-size:14px;

min-width: 0;

overflow: hidden;

white-space: nowrap;

}

</style>

<div class="links-content">

<div class="link-navigation">

<div class="card">

<img class="ava" src="https://xingwangzhe.fun/avatar.webp" alt="1" />

<div class="card-header">

<div>

<a href="https://xingwangzhe.github.io">xingwangzhe</a>

</div>

<div class="info">记录学习生活的琐事,或者技术文章:)</div>

</div>

</div>

<div class="card">

<img class="ava" src="https://xingwangzhe.fun/avatar.webp" alt="1" />

<div class="card-header">

<div>

<a href="https://xingwangzhe.github.io">xingwangzhe</a>

</div>

<div class="info">记录学习生活的琐事,或者技术文章:)</div>

</div>

</div>

</div>

</div>

</div>

</div>

</section>

</body>

关键代码

<div class="card">

<img class="ava" src="https://xingwangzhe.github.io/images/avatar.jpg" alt="123" />

<--双引号里是网站图标,你可以通过F12在<head></head>之间找到-->

<div class="card-header">

<div>

<a href="https://xingwangzhe.github.io">xingwangzhe</a>

<--双引号里面是网站链接,后面的文本是标题-->

</div>

<div class="info">记录学习生活的琐事,或者技术文章:)</div>

<--这段文本是网站描述-->

</div>

</div>

你可以通过多次重复使用这些代码来实现添加友链的效果

效果如下

友情链接

别忘了这是markdown.md

你可以自定义后续的内容:)

参考推荐

Hexo个人博客自定义友链页面 hexo NexT 添加友链页面