diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6c9be308..cb341d56 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -16,5 +16,6 @@ "mutantdino.resourcemonitor", "budparr.language-hugo-vscode" ], - "runArgs": [] + "runArgs": [], + "forwardPorts": [1313] } diff --git a/exampleSite/config.toml b/exampleSite/config.toml index ac5db86a..f8f37aac 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -138,6 +138,8 @@ ignoreErrors = ["error-remote-getjson"] gravatarEmail = "" # URL of avatar shown in home page avatarURL = "/images/avatar.png" + # {{< version 0.1.1 >}} Alt text for avatar (default is the author name) + avatarAlt = "" # title shown in home page (HTML format is supported) title = "" # subtitle shown in home page @@ -339,6 +341,8 @@ ignoreErrors = ["error-remote-getjson"] gravatarEmail = "" # 主页显示头像的 URL avatarURL = "/images/avatar.png" + # {{< version 0.1.1 >}} Alt text for avatar (default is the author name) + avatarAlt = "" # 主页显示的网站标题 (支持 HTML 格式) title = "" # 主页显示的网站副标题 @@ -535,6 +539,8 @@ ignoreErrors = ["error-remote-getjson"] gravatarEmail = "" # URL of avatar shown in home page avatarURL = "/images/avatar.png" + # {{< version 0.1.1 >}} Alt text for avatar (default is the author name) + avatarAlt = "" # title shown in home page (HTML format is supported) title = "" # subtitle shown in home page @@ -903,7 +909,7 @@ ignoreErrors = ["error-remote-getjson"] id = "" # server url for your tracker if you're self hosting server = "" - # Plausible Analytics + # {{< version 0.1.0 >}} Plausible Analytics [params.analytics.plausible] domain = "" @@ -962,7 +968,7 @@ ignoreErrors = ["error-remote-getjson"] # Author config [author] - name = "xxxx" + name = "CodeIT" email = "" link = "" diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md index 1c7b6bb6..7c122ce6 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.en.md @@ -312,6 +312,8 @@ Please open the code block below to view the complete sample configuration :(far gravatarEmail = "" # URL of avatar shown in home page avatarURL = "/images/avatar.png" + # {{< version 0.1.1 >}} Alt text for avatar (default is the author name) + avatarAlt = "" # title shown in home page (HTML format is supported) title = "" # subtitle shown in home page diff --git a/exampleSite/content/posts/theme-documentation-basics/index.fr.md b/exampleSite/content/posts/theme-documentation-basics/index.fr.md index d1b5d17a..ac0450a9 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.fr.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.fr.md @@ -317,6 +317,8 @@ Please open the code block below to view the complete sample configuration :(far gravatarEmail = "" # URL of avatar shown in home page avatarURL = "/images/avatar.png" + # {{< version 0.1.1 >}} Alt text for avatar (default is the author name) + avatarAlt = "" # title shown in home page (HTML format is supported) title = "" # subtitle shown in home page diff --git a/layouts/partials/home/profile.html b/layouts/partials/home/profile.html index 46ab739d..ba2462eb 100644 --- a/layouts/partials/home/profile.html +++ b/layouts/partials/home/profile.html @@ -7,16 +7,17 @@ {{- if $avatar -}}
{{- $menus := $.Site.Menus.main | default slice -}} + {{- $avatarAlt := $profile.avatarAlt | default .Site.Author.name -}} {{- with index $menus 0 -}} {{- $url := .URL | relLangURL -}} {{- with .Page -}} {{- $url = .RelPermalink -}} {{- end -}} - {{- dict "Src" $avatar | partial "plugin/image.html" -}} + {{- dict "Src" $avatar "Alt" $avatarAlt | partial "plugin/image.html" -}} {{- else -}} - {{- dict "Src" $avatar | partial "plugin/image.html" -}} + {{- dict "Src" $avatar "Alt" $avatarAlt | partial "plugin/image.html" -}} {{- end -}}
{{- end -}}