• English
  • 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:

    1. friendGroups — Defines the categories (groups) for organizing friend links, each with a display name and emoji icon
    2. friends — The list of friend websites, each assigned to a group
    3. siteInfo — Information about your site displayed in the link exchange section
    4. _link-apply.md — Optional custom content for the link application/request area

    Configuration

    Friend Groups — friendGroups

    Define the categories that organize your friend links:

    friendGroups:
      技术伙伴: 💻
      生活博主: 🌿
      设计达人: 🎨
      朋友们: 🤝

    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:

    friends:
      - name: 小明科技
        url: https://xiaoming.tech
        desc: 分享前沿技术见解与编程心得
        avatar: https://xiaoming.tech/avatar.png
        group: 技术伙伴
    
      - name: 阿花的日常
        url: https://ahua.life
        desc: 记录生活中的小确幸
        avatar: https://ahua.life/avatar.jpg
        group: 生活博主
    
      - name: PixelStudio
        url: https://pixelstudio.design
        desc: A digital design studio based in Tokyo
        avatar: https://pixelstudio.design/logo.png
        group: 设计达人
    PropertyTypeDescription
    namestringFriend's site name
    urlstringFriend's site URL
    descstringA short description of their site
    avatarstringAvatar or logo image URL
    groupstringGroup name — must match a key in friendGroups

    Important: The group value must exactly match one of the keys in friendGroups (case-sensitive). Friends whose group does 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:

    siteInfo:
      url: https://yourblog.com
      avatar: https://yourblog.com/avatar.png
      atom: https://yourblog.com/atom.xml
    PropertyTypeDefaultDescription
    urlstring''Your site URL
    avatarstring''Your site avatar/logo
    atomstring''Your Atom/RSS feed URL

    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.

    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:

    Please provide your site info in the following format (below is my site info):
    
    <!-- siteinfo -->

    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:

    {%card%}If you meet the requirements above, feel free to leave a comment below to request a link exchange~{%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:

    ---
    title: Exchange Links
    ---
    
    Requirements for your site:
    
    - Must use HTTPS and be stable
    - Must comply with applicable laws
    - No ads, commercial content, or scraped content
    
    {%card%}If you meet the requirements above, feel free to leave a comment below to request a link exchange~{%card%}
    
    Please provide your site info in the following format (below is my site info):
    
    <!-- siteinfo -->
    
    ---
    
    ### Note
    
    - I will process your request as soon as possible
    - Comments may take a moment to appear — thanks for your patience~

    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:

    ---
    title: Friends
    date: 2024-01-01
    layout: links
    ---
    
    Welcome to my friend links page! Here are some great sites I follow.

    Important: The {%card%}...{%card%} tag pair and <!-- siteinfo --> marker are for use within layout/_link-apply.md — do not write them in source/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.