Skip to content

Commit

Permalink
Feat: 通过参数统一管理知识星球链接
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Jul 25, 2024
1 parent eaa3788 commit fce830b
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 4 deletions.
6 changes: 6 additions & 0 deletions assets/css/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@
}
}

.aside-custom {
&:not(:first-child) {
margin-top: 1rem;
}
}

[lang='en'] {
.collection-details .collection-summary .collection-name::before {
content: '';
Expand Down
Binary file added assets/images/zsxq.webp
Binary file not shown.
6 changes: 6 additions & 0 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,12 @@ disableThemeInject = false
# 支持 "vConsole", "eruda"
type = "vConsole"

# FixIt Docs config
[planet]
invite = "https://t.zsxq.com/BQcpe" # 正常加入链接:https://t.zsxq.com/CE3GF
promotion_coupon = "https://t.zsxq.com/BQcpe"
renewal_coupon = ""

# Page config
# 文章页面配置
[page]
Expand Down
6 changes: 4 additions & 2 deletions content/en/community/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ All feedback is welcome! Head over to the [discussions][discussions], [Pull requ
| [Hugo FixIt Planet][zsxq] | Official Knowledge Planet[^1] |

<!-- footnote reference definition -->
[^1]: Knowledge Planet is a paid community platform for knowledge sharing and communication. If you need more help and support, you can join our Knowledge Planet. ([Newcomer Coupon~](https://t.zsxq.com/BQcpe))
[^1]: Knowledge Planet is a paid community platform for knowledge sharing and communication. If you need more help and support, you can join our Knowledge Planet. ([Newcomer Coupon~][promotion_coupon])

<!-- link reference definition -->
<!-- markdownlint-disable-file reference-links-images -->
[fixit]: https://github.com/hugo-fixit/FixIt
[author]: https://github.com/Lruihao
[discussions]: https://github.com/orgs/hugo-fixit/discussions
[pulls]: https://github.com/hugo-fixit/FixIt/pulls
[issues]: https://github.com/hugo-fixit/FixIt/issues
[qq-group]: https://qm.qq.com/cgi-bin/qm/qr?k=awbwdTtSQ_-H5QGzeJxdWgv6JMbNehNM&jump_from=webapi
[zsxq]: https://t.zsxq.com/CE3GF
[zsxq]: {{< param planet.invite >}}
[promotion_coupon]: {{< param planet.promotion_coupon >}}
6 changes: 4 additions & 2 deletions content/zh-cn/community/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ _~作者:[Lruihao][author]~_
| [Hugo FixIt 星球][zsxq] | 官方知识星球[^1] |

<!-- footnote reference definition -->
[^1]: 知识星球是一个付费的知识分享和交流社区平台。如果你需要更多的帮助和支持,可以加入我们的知识星球。([新人优惠券~](https://t.zsxq.com/BQcpe)
[^1]: 知识星球是一个付费的知识分享和交流社区平台。如果你需要更多的帮助和支持,可以加入我们的知识星球。([新人优惠券~][promotion_coupon]

<!-- link reference definition -->
<!-- markdownlint-disable-file reference-links-images -->
[fixit]: https://github.com/hugo-fixit/FixIt
[author]: https://github.com/Lruihao
[discussions]: https://github.com/orgs/hugo-fixit/discussions
[pulls]: https://github.com/hugo-fixit/FixIt/pulls
[issues]: https://github.com/hugo-fixit/FixIt/issues
[qq-group]: https://qm.qq.com/cgi-bin/qm/qr?k=awbwdTtSQ_-H5QGzeJxdWgv6JMbNehNM&jump_from=webapi
[zsxq]: https://t.zsxq.com/CE3GF
[zsxq]: {{< param planet.invite >}}
[promotion_coupon]: {{< param planet.promotion_coupon >}}
1 change: 1 addition & 0 deletions layouts/partials/custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
{{- end -}}

{{- define "custom-aside" -}}
{{- partial "custom/aside.html" . -}}
{{- end -}}

{{- define "custom-footer" -}}
Expand Down
9 changes: 9 additions & 0 deletions layouts/partials/custom/aside.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="aside-custom">
{{- /* Hugo FixIt Planet */ -}}
{{- $zsxqImg := resources.Get "images/zsxq.webp" -}}
{{- $planetConfig := .Site.Params.planet -}}
<a href="{{ $planetConfig.invite }}" target="_blank" rel="external" >
<img src="{{ $zsxqImg.RelPermalink }}" alt="Hugo FixIt Planet QR code" width="100%">
</a>
</div>
{{- /* EOF */ -}}

0 comments on commit fce830b

Please sign in to comment.