diff --git a/CHANGELOG.md b/CHANGELOG.md index ca904617..aa151987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. - :sparkles: Feat: add custom templates and parameter `params.customFilePath` support - :sparkles: Feat: add feature end of post flag support ([#236](https://github.com/hugo-fixit/FixIt/issues/236)) - :sparkles: Feat: add params to close wordcount and readingTime in post ([#209](https://github.com/hugo-fixit/FixIt/issues/209)) +- :sparkles: Feat: add parameter `params.home.profile.avatarMenu` - :truck: Feat: migrate parameter `params.autoBookmark` to `params.page.autoBookmark` ([#55](https://github.com/hugo-fixit/FixIt/issues/55)) - :zap: Perf: optimize close comment feature when the post has expired ([#204](https://github.com/hugo-fixit/FixIt/issues/204)) - :zap: Perf: optimize sub menu position calculation in desktop header with css replace of javascript diff --git a/config.toml b/config.toml index 15265c56..bd7fc583 100644 --- a/config.toml +++ b/config.toml @@ -203,6 +203,8 @@ gravatarEmail = "xx@xx.com" # URL of avatar shown in home page avatarURL = "" + # FixIt 0.2.17 | NEW identifier of avatar menu link + avatarMenu = "" # FixIt 0.2.7 | CHANGED title shown in home page (HTML format is supported) title = "" # subtitle shown in home page diff --git a/docs b/docs index ebed6cbb..af37a6cf 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit ebed6cbba2f35f5ec21b2e2d8471ed6b62658c2b +Subproject commit af37a6cff97d5c28e82b4798fbb0c9fdc86bb2d3 diff --git a/layouts/partials/home/profile.html b/layouts/partials/home/profile.html index 78f518fc..3a1b6851 100644 --- a/layouts/partials/home/profile.html +++ b/layouts/partials/home/profile.html @@ -14,7 +14,15 @@ {{- if $avatar -}}
{{- $menus := $.Site.Menus.main | default slice -}} - {{- with index $menus 0 -}} + {{- $avatarMenuIndex := 0 -}} + {{- if $profile.avatarMenu -}} + {{- range $index, $menu := $menus -}} + {{- if eq $menu.Identifier $profile.avatarMenu -}} + {{- $avatarMenuIndex = $index -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- with index $menus $avatarMenuIndex -}} {{- $url := .URL | relLangURL -}} {{- with .Page -}} {{- $url = .RelPermalink -}}