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

推荐订阅源

IT之家
IT之家
Last Week in AI
Last Week in AI
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
人人都是产品经理
人人都是产品经理
V
Visual Studio Blog
宝玉的分享
宝玉的分享
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
T
Tailwind CSS Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
量子位
博客园 - 聂微东
S
SegmentFault 最新的问题
博客园 - 司徒正美
罗磊的独立博客
V
V2EX
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
美团技术团队
小众软件
小众软件
Jina AI
Jina AI

Donghai's Blog

使用DBeaver连接Dynamics 365 Dataverse | Donghai C# 技术备忘 - LINQ | Donghai 为Astro站点添加Google Analytics | Donghai C# 技术备忘 - LINQ - Donghai’s Blog 20260819 说些什么 | Donghai Dynamics 365 interview questions | Donghai C# 技术备忘 (1) | Donghai Dynamics 365 事件框架、事件执行管道 | Donghai 马拉松配速表 | Donghai 马拉松赛事分级 | Donghai 抖音创作日志(2026年) | Donghai 2026年跑步日志(5月开始) | Donghai 2FA | Donghai 初尝Github Actions | Donghai AstroPaper主题添加Waline评论 | Donghai Dynamics 365集中视图/聚焦视图/Focused View | Donghai AstroPaper主题添加GitHub风格的Markdown警告框 | Donghai AstroPaper主题自定义记录 | Donghai 我日常收藏的优质网站资源导航(持续更新) | Donghai 如何从归档页批量获取URL并提交到Bing Webmaster Tools | Donghai PaperMod 使用 Zeoseven 自定义网页字体 | Donghai 我常用的Prompt | Donghai Hugo默认时区导致本地预览文章不显示 | Donghai 通过手动提交工单解决Bing不收录网站问题 | Donghai 如何访问 Power BI 管理门户(Power BI Admin Portal) | Donghai 还在手敲时间戳?Win11输入法一个技巧,秒输当前时间戳 | Donghai 工作术语备忘录(持续更新) | Donghai 使用XrmToolBox导出安全角色表级权限到Excel | Donghai 24年的年终总结 | Donghai World笔记 | Donghai
PaperMod添加友情链接页面 | Donghai
Donghai · 2025-01-28 · via Donghai's Blog

Table of contents

Open Table of contents
  • 步骤 1
  • 步骤 2

步骤 1

新建文件:layouts_default/friend-link.html

{{- define "main" }}

<article class="post-single">
  <header class="post-header">
    {{ partial "breadcrumbs.html" . }}

    <h1 class="post-title entry-hint-parent">
      {{ .Title }} {{- if .Draft }}
      <span class="entry-hint" title="Draft">
        <svg
          xmlns="http://www.w3.org/2000/svg"
          height="35"
          viewBox="0 -960 960 960"
          fill="currentColor"
        >
          <path
            d="M160-410v-60h300v60H160Zm0-165v-60h470v60H160Zm0-165v-60h470v60H160Zm360 580v-123l221-220q9-9 20-13t22-4q12 0 23 4.5t20 13.5l37 37q9 9 13 20t4 22q0 11-4.5 22.5T862.09-380L643-160H520Zm300-263-37-37 37 37ZM580-220h38l121-122-18-19-19-18-122 121v38Zm141-141-19-18 37 37-18-19Z"
          />
        </svg>
      </span>
      {{- end }}
    </h1>

    {{- if not (.Param "hideMeta") }}
    <div class="post-meta">
      {{- partial "post_meta.html" . -}} {{- partial "translation_list.html" .
      -}} {{- partial "edit_post.html" . -}} {{- partial "post_canonical.html" .
      -}}
    </div>
    {{- end }} {{- if .Description }}
    <div class="post-description">{{ .Description }}</div>
    {{- end }}
  </header>
  {{- $isHidden := (.Param "cover.hiddenInSingle") | default (.Param
  "cover.hidden") | default false }} {{- partial "cover.html" (dict "cxt" .
  "IsSingle" true "isHidden" $isHidden) }} {{- if (.Param "ShowToc") }} {{-
  partial "toc.html" . }} {{- end }} {{- if .Content }}
  <div class="post-content">
    {{- if not (.Param "disableAnchoredHeadings") }} {{- partial
    "anchored_headings.html" .Content -}} {{- else }}{{ .Content }}{{ end }}
    {{/* Begin.友情链接页面*/}}
    <div class="friend-link-container">
      {{ range .Params.links }}
      <a
        href="{{ .url }}"
        title="{{ .name }}"
        class="friend-link"
        target="_blank"
        rel="friend"
      >
        <div class="friend-link-div">
          <div class="friend-link-avatar">
            {{ $path := replace .avatar "/images/" "" }} {{ $orig :=
            resources.Get (printf "images/%s" $path) }} {{ $img := $orig.Fill
            "200x200 Center" }}
            <img
              src="{{ $img.Permalink }}"
              class="friend-avatar"
              loading="lazy"
              alt="{{ .name }}"
            />
          </div>
          <div class="friend-link-info">
            <span class="friend-name">{{ .name }}</span>
            <p class="friend-bio">{{ .bio }}</p>
            <p class="friend-bio url-name">{{ .urlname }}</p>
          </div>
        </div>
      </a>
      {{ end }}
    </div>
    {{/* End.友情链接页面*/}}

    <div
      style="border: 1px dashed var(--accent); border-radius: 6px; padding: 15px 15px 0 15px; margin-top: 20px; line-height: 1.2;"
    >
      <strong style="font-size: 1.05em;">友链申请格式:</strong>
      <div style="margin-top: 10px;">
        <p>博客名称:<code>你的博客名称</code></p>
        <p>博客地址:<code>https://你的博客地址</code></p>
        <p>博客头像:<code>https://你的头像链接</code></p>
        <p>博客简介:<code>一句话介绍你的博客</code></p>
      </div>
    </div>
  </div>

  {{- end }}

  <footer class="post-footer">
    {{- $tags := .Language.Params.Taxonomies.tag | default "tags" }}
    <ul class="post-tags">
      {{- range ($.GetTerms $tags) }}
      <li><a href="{{ .Permalink }}">#&nbsp;{{ .LinkTitle }}</a></li>
      {{- end }}
    </ul>
  </footer>

  {{- if (.Param "comments") }} {{- partial "comments.html" . }} {{- end }}
</article>

{{- end }}layouts_default/friend-link.html

步骤 2

新建 content/friend-link.md 文件

"url": "https://mgrowup.com", 图片维护在 ./assets/images

---
title: "友链"
draft: false
ShowReadingTime: false
showToc: false
TocOpen: true
comments: false
enableCopyright: false
enableDonate: false
layout: "friend-link"
links:
  [
    {
      "name": "Donghai",
      "url": "https://mgrowup.com",
      "avatar": "/images/xxxx.webp",
      "bio": "真诚记录,生活值得",
      "urlname": "mgrowup.com",
    },
  ]
---

1. 欢迎互换友链,根据<mark>友链提交模板在下方评论</mark>(也可以通过[邮件](mailto:mgrowup@outlook.com?subject=友链申请&body=博客名称:%0D%0A博客地址:%0D%0A博客头像:%0D%0A博客简介:)发我)
2. 排名不分先后,按照添加时间排序,我的友链信息:

```txt
{
  名称:Donghai
  地址:https://mgrowup.com/
  头像:https://mgrowup.com/avatar.webp
  描述:真诚记录,生活值得
}
```content/friend-link.md

(完)

如果这篇文章刚好帮到了你,欢迎请我喝杯咖啡