chore: 初始化 Hugo 博客项目
Hextra 主题,8 篇文章,支持全文搜索/暗色模式
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{{/* Render raw svg icon from site data */}}
|
||||
{{- $siteData := partial "utils/hugo-compat/site-data.html" . -}}
|
||||
{{- $icon := index $siteData.icons .name -}}
|
||||
|
||||
{{- if not $icon -}}
|
||||
{{ errorf "icon %q not found" .name }}
|
||||
{{- end -}}
|
||||
|
||||
{{- $icon = $icon | safeHTML -}}
|
||||
|
||||
{{- if .attributes -}}
|
||||
{{- $icon = replaceRE "<svg" (printf "<svg %s" .attributes) $icon -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- return ($icon | safeHTML) -}}
|
||||
Reference in New Issue
Block a user