Friend Links
The Friend Links page (/links) is a dedicated page where you can showcase your friends' blogs and websites. It also includes a Link Exchange section so visitors can learn about your site and apply to exchange links.
Overview of Components
The Friend Links page is built from three configuration sources:
friendGroups— Defines the categories (groups) for organizing friend links, each with a display name and emoji iconfriends— The list of friend websites, each assigned to a groupsiteInfo— Information about your site displayed in the link exchange section_link-apply.md— Optional custom content for the link application/request area
Configuration
Friend Groups — friendGroups
Define the categories that organize your friend links:
Each key is the group name (displayed as a section heading on the links page), and each value is an emoji (displayed next to the heading). You can define as many groups as you like.
Friends List — friends
Each friend is an entry in the friends array:
Important: The
groupvalue must exactly match one of the keys infriendGroups(case-sensitive). Friends whosegroupdoes not match any defined group will not be displayed.
Site Info — siteInfo
The link exchange section shows information about your site so potential link partners can learn about you:
The site name and description are automatically pulled from Hexo's main _config.yml (title and description or subtitle fields). You do not need to repeat them in siteInfo.
The data from siteInfo is used in the Link Exchange section at the bottom of the friend links page, where your site information is automatically displayed for other webmasters to copy.
Link Exchange / Apply Section
The "Exchange Links" section at the bottom of the friend links page is driven by the theme file layout/_link-apply.md. Edit this file to customize the content and format of the link exchange section.
The file supports the following syntax:
The <!-- siteinfo --> Marker
Use <!-- siteinfo --> in _link-apply.md to specify where the site info card should appear:
The <!-- siteinfo --> marker is replaced with your site information card, including blog name, description, URL, avatar, and Atom feed — each with a copy button for easy sharing.
The {%card%} Card Syntax
Wrap content with {%card%}...{%card%} to render it as a styled note/callout card:
Supported Markdown Syntax
The following standard Markdown syntax is supported within _link-apply.md:
- Headings (
#,##,###) - Unordered lists (
-) - Links (
[text](url)) - Bold (
**text**) and italic (*text*) - Horizontal rules (
---)
Complete Example
layout/_link-apply.md:
Friend Links Page Markdown
The friend links page itself (created via hexo new page links, i.e. source/links/index.md) is used for introductory text at the top of the page:
Important: The
{%card%}...{%card%}tag pair and<!-- siteinfo -->marker are for use withinlayout/_link-apply.md— do not write them insource/links/index.md. The friend link card list and link exchange section are rendered automatically by the theme; no manual insertion is needed in your page Markdown.
Related Pages
- Navigation & Menus — Add a "友链" menu item to your nav bar (it has a built-in icon)
- Categories & Tags — Another content organization feature
