Skip to content

Commit

Permalink
🐛 Fix(ignore): PostChat and PostSummary config merge error
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Dec 18, 2024
1 parent 041d5e2 commit 809a0fd
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions layouts/partials/plugin/post-chat-ai.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@
PostChat: https://postchat.zhheo.com/addCode.html
PostSummary: https://postchat.zhheo.com/summary.html
TODO dark/light mode switch
TODO 表格的序号排除摘要
*/ -}}
{{- $params := partial "function/params.html" -}}
{{- $chatConfig := .Param "postChat" -}}
{{- $summaryConfig := .Param "postSummary" -}}
{{- $chatConfig := .Site.Params.postChat -}}
{{- $summaryConfig := .Site.Params.postSummary -}}
{{- with .Params.postChat -}}
{{- $chatConfig = . | merge .Site.Params.postChat -}}
{{- end -}}
{{- with .Params.postSummary -}}
{{- $summaryConfig = . | merge .Site.Params.postSummary -}}
{{- end -}}
{{- $key := $chatConfig.key | default $summaryConfig.key -}}
{{- $sourcePrefix := "https://ai.tianli0.top/static/public/" -}}
{{- $jsMap := dict
Expand Down Expand Up @@ -65,8 +72,8 @@
{{- $blackDom := slice
".expiration-reminder"
"meting-js"
".lnt"
-}}
{{/* 合并 $blackDom 和 $chatConfig.blackDom */}}
{{- with $chatConfig.blackDom -}}
{{- $blackDom = $blackDom | append . -}}
{{- end -}}
Expand All @@ -79,7 +86,7 @@
"height" $chatConfig.height
"fill" $chatConfig.fill
"backgroundColor" $chatConfig.backgroundColor
"upLoadWeb" $chatConfig.upLoadWeb
"upLoadWeb" (cond .IsHome false $chatConfig.upLoadWeb)
"showInviteLink" $chatConfig.showInviteLink
"userTitle" $chatConfig.userTitle
"userDesc" $chatConfig.userDesc
Expand Down

0 comments on commit 809a0fd

Please sign in to comment.