chore: 初始化 Hugo 博客项目

Hextra 主题,8 篇文章,支持全文搜索/暗色模式
This commit is contained in:
claw
2026-05-13 12:48:53 +08:00
committed by fukunee
commit 07851043b1
624 changed files with 48007 additions and 0 deletions
@@ -0,0 +1,28 @@
{{- /*
Create a tab.
@param {string} name The name of the tab.
@param {string} icon The icon of the tab.
@param {string} selected Whether the tab is selected.
@example {{< tab name="Foo" icon="document-text" selected=true >}}content{{< /tab >}}
*/ -}}
{{- $name := .Get "name" | default (printf "Tab %d" .Ordinal) -}}
{{- $icon := .Get "icon" -}}
{{- $selected := .Get "selected" -}}
{{- if .Parent.Get "defaultIndex" -}}
{{- $selected = eq .Ordinal (int (.Parent.Get "defaultIndex")) -}}
{{- end -}}
{{- $tabs := .Parent.Store.Get "tabs" | default slice -}}
{{ .Parent.Store.Set "tabs" ($tabs | append (dict
"id" .Ordinal
"name" $name
"icon" $icon
"content" .InnerDeindent
"selected" $selected
))
-}}