diff --git a/hugo.toml b/hugo.toml index 5af42bcc..d569b8b0 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1070,11 +1070,11 @@ hotWords = true # FixIt 0.3.17 | NEW Summary AI config # See https://ai.zhheo.com/docs/summary.html [params.postSummary] -enable = false +enable = true # If you set `params.postChat.key`, you don't need to set `params.postSummary.key` key = "" title = "" -# themes options: ["", "simple", "yanzhi"] +# themes options: ["", "simple", "yanzhi", "menghuan"] theme = "" postURL = "" blacklist = "" @@ -1083,6 +1083,11 @@ typingAnimate = true beginningText = "" loadingText = true +# FixIt 0.4.0 | NEW Podcast AI config +# See https://ai.zhheo.com/docs/podcast.html +[params.podcast] +enable = false + # FixIt 0.3.10 | NEW Global Feed config for RSS, Atom and JSON feed. [params.feed] # The number of posts to include in the feed. If set to -1, all posts. diff --git a/layouts/_partials/init/index.html b/layouts/_partials/init/index.html index aa614381..a9420f7e 100644 --- a/layouts/_partials/init/index.html +++ b/layouts/_partials/init/index.html @@ -1,4 +1,4 @@ -{{- hugo.Store.Set "version" "v0.4.0-beta" -}} +{{- hugo.Store.Set "version" "v0.4.0-beta-20260103085920-53396290" -}} {{- .Store.Set "this" dict -}} {{- partial "init/detection-env.html" . -}} diff --git a/layouts/_partials/plugin/post-chat-ai.html b/layouts/_partials/plugin/post-chat-ai.html index 2afe2406..a94b3f20 100644 --- a/layouts/_partials/plugin/post-chat-ai.html +++ b/layouts/_partials/plugin/post-chat-ai.html @@ -2,10 +2,13 @@ PostChat AI service. PostChat: https://ai.zhheo.com/docs/addCode.html PostSummary: https://ai.zhheo.com/docs/summary.html + Podcast: https://ai.zhheo.com/docs/podcast.html + TODO refactor and migrate to theme component */ -}} {{- $params := .Params | merge .Site.Params -}} {{- $chatConfig := $params.postChat -}} {{- $summaryConfig := $params.postSummary -}} +{{- $podcastConfig := $params.podcast -}} {{- $key := $chatConfig.key | default $summaryConfig.key -}} {{- $sourcePrefix := "https://ai.zhheo.com/static/public/" -}} {{- $jsMap := dict @@ -29,7 +32,7 @@ {{- $postChatCSS := "https://ai.zhheo.com/static/public/postChatUser_summary.min.css" -}} {{- dict "Source" $postChatCSS "Fingerprint" $fingerprint | dict "Page" . "Data" | partial "store/style.html" -}} {{- $p := "tianliGPT" -}} - {{- $postSummaryConfig := printf "let %v_postSelector='#content';" $p -}} + {{- $postSummaryConfig := printf "let %v_postSelector='#content';let %v_injectDom='.ai-summary';" $p $p -}} {{- with $summaryConfig.title -}} {{- $postSummaryConfig = add $postSummaryConfig (printf "let %v_Title='%v';" $p .) -}} {{- end -}} @@ -59,6 +62,10 @@ {{- else -}} {{- $postSummaryConfig = add $postSummaryConfig (printf "let %v_key='%v';" $p $key) -}} {{- end -}} + {{- /* Podcast */ -}} + {{- if $podcastConfig.enable -}} + {{- $postSummaryConfig = add $postSummaryConfig (printf "let %v_podcast=true;" $p) -}} + {{- end -}} {{- $configJS = add $configJS $postSummaryConfig -}} {{- end -}} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 671b4900..eed22f46 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -167,6 +167,12 @@ {{- end -}} + {{- /* AI Summary */ -}} + {{- $summaryConfig := (.Params | merge .Site.Params).postSummary -}} + {{- if $summaryConfig.enable -}} +
+ {{- end -}} + {{- /* Custom block before post content */ -}} {{- block "custom-post__content:before" . }}{{ end -}}