Files
halo-theme-WarmIsland/docs/config/links.md
T
2026-05-19 17:25:43 +08:00

71 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 友情链接
友情链接模块用于展示与其他站点的互链关系,是博客社交属性的重要体现。WarmIsland 提供了三种展示样式,适配不同的视觉偏好。
## 配置项一览
| 配置项 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| `links_page_title` | 文本 | `友情链接` | 页面标题 |
| `links_style` | 下拉 | `cards` | 展示样式:`grid` / `list` / `cards` |
## 前置依赖
::: danger
友情链接功能依赖 Halo 的 **PluginLinks** 插件。如果未安装此插件,友情链接页面将无法正常工作。
安装方式:Halo 后台 → **插件****安装** → 搜索「Links」→ 安装并启用。
:::
## 详细说明
### 页面标题(links_page_title
友情链接页面的标题,显示在页面顶部。
```yaml
links_page_title: "友情链接" # 默认
links_page_title: "友链" # 简称
links_page_title: "Friends" # 英文站点
```
### 展示样式(links_style
| 值 | 说明 |
| --- | --- |
| `grid` | 网格样式,友链以均匀的网格卡片排列,紧凑整齐 |
| `list` | 列表样式,友链以水平列表项排列,信息展示更完整 |
| `cards` | 卡片样式,友链以独立卡片展示,视觉层次丰富(默认) |
::: tip
`cards` 样式最为推荐,它在视觉效果和信息展示之间取得了最佳平衡。`grid` 样式适合友链数量较多的站点,`list` 样式适合需要展示详细描述信息的场景。
:::
## 链接管理
友情链接的数据通过 Halo 后台管理,而非主题设置面板。管理步骤如下:
1. 登录 Halo 后台管理控制台
2. 进入 **链接****新建** 添加友情链接
3. 填写链接信息:
- **名称** — 站点名称
- **URL** — 站点地址
- **Logo** — 站点 Logo 或头像
- **描述** — 站点简介
- **分组** — 链接分组(可选)
4. 保存后,友情链接页面会自动展示
::: tip
建议为每个友链填写 Logo 和描述信息,这样在 `cards``grid` 样式下展示效果更佳。Logo 推荐使用正方形图片。
:::
### 分组管理
PluginLinks 支持链接分组功能。你可以将友链按不同类别分组(如「技术博客」「生活博客」「工具站点」等),页面会以分组为单位展示。
## 相关页面
- [朋友圈](/config/friends) — 朋友圈页面配置
- [页脚](/config/footer) — 页脚社交链接配置
- [友情链接页面](/pages/links) — 友链模板与结构说明