diff options
| author | BigCoke233 <hi@guhub.cn> | 2025-12-17 20:20:33 +0800 |
|---|---|---|
| committer | BigCoke233 <hi@guhub.cn> | 2025-12-17 20:20:33 +0800 |
| commit | 3c66c950e69ea07748429012c4a43099ca240745 (patch) | |
| tree | bfa2f71fb515628263606654f0bd2dcccfb09d02 | |
| parent | 527f8517d1a0dbe8693a0872f7d3a98be78f96a6 (diff) | |
refactor: move header image source configurable
| -rw-r--r-- | config/_default/params.yaml | 1 | ||||
| -rw-r--r-- | layouts/_partials/components/logo.html | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/config/_default/params.yaml b/config/_default/params.yaml index 41ca6929..bb2946c2 100644 --- a/config/_default/params.yaml +++ b/config/_default/params.yaml @@ -3,6 +3,7 @@ author: name: Eltrac avatar: https://image.guhub.cn/uPic/2025/12/once-drowned-koala-king.jpg email: hi@guhub.cn +logo: "https://image.guhub.cn/uPic/2025/05/header.png!w160" mainSections: - essays - posts diff --git a/layouts/_partials/components/logo.html b/layouts/_partials/components/logo.html index a7c2d560..78a90496 100644 --- a/layouts/_partials/components/logo.html +++ b/layouts/_partials/components/logo.html @@ -1,9 +1,8 @@ -{{ $default := "https://image.guhub.cn/uPic/2025/05/header.png!w160" }} +{{ $ctx := .ctx }} {{ $link := .link | default "" }} -{{ $src := .src | default $default }} +{{ $src := .src | default .ctx.Site.Params.logo }} {{ $class := .class | default "" }} {{ $imageClass := .imageClass | default "" }} -{{ $ctx := .ctx }} <a href="{{ $ctx.Site.LanguagePrefix }}/{{ $link }}" class="title-image-container {{ $class }}"> |
