mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
feat(post-chat-ai): add podcast support and enhance post summary configuration
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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" . -}}
|
||||
|
||||
@@ -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 -}}
|
||||
|
||||
|
||||
@@ -167,6 +167,12 @@
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* AI Summary */ -}}
|
||||
{{- $summaryConfig := (.Params | merge .Site.Params).postSummary -}}
|
||||
{{- if $summaryConfig.enable -}}
|
||||
<div class="ai-summary"></div>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Custom block before post content */ -}}
|
||||
{{- block "custom-post__content:before" . }}{{ end -}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user