Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

Tremse
Copy link

@Tremse Tremse commented Aug 1, 2025

单独的Friends界面

image 由于友链的数量增加,把所有友链放在卡片上已经不太够用了,所以单独整出一个页面来放置这些友链,并且还可以显示大家的头像和描述~

1. 创建friends页面

hexo new page friends

2. 修改新页面的配置:

---
title: Friends
date: None
type: friends
---

3. 添加友链信息

你需要在hexo项目的source目录下新建一个_data目录,再新建一个friends.json的配置文件.
friends.json配置方式如下:

[
  {
    "name": "Tofv404",
    "url": "https://www.cnblogs.com/T0fV404",
    "des": "Tofv404最帅咯(fumofumo)",
    "avatar": "/images/tofv.jpg"
  },
  ...
]

以上,name即ID, url为友链url, des为描述, avatar为好友的头像.
请将好友的头像放置于your-hexo-project/themes/particlex/source/images下,当然也可以从图床导入,但是这样会导致加载过慢,推荐直接放置于images下.

文章的toc目录

image 为文章创建了单独的toc目录,使用该目录时请先安装hexo的toc插件:
npm install hexo-toc --save

在希望显示目录的文章的配置中加入toc: true即可. 例如:

---
    title: Hello World
    toc: true
---
context...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.