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 91f3ad7
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions layouts/partials/plugin/post-chat-ai.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@
TODO dark/light mode switch
*/ -}}
{{- $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 +71,8 @@
{{- $blackDom := slice
".expiration-reminder"
"meting-js"
".lnt"
-}}
{{/* 合并 $blackDom 和 $chatConfig.blackDom */}}
{{- with $chatConfig.blackDom -}}
{{- $blackDom = $blackDom | append . -}}
{{- end -}}
Expand All @@ -79,7 +85,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 91f3ad7

Please sign in to comment.