Skip to content

Commit

Permalink
feat(layout): add support for recaptchaV3Key and turnstileKey in wali…
Browse files Browse the repository at this point in the history
…ne comments #266
  • Loading branch information
EvanNotFound committed Dec 8, 2023
1 parent 62ce10b commit 616f9d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ comment:
serverUrl: https://example.example.com # Waline server URL. e.g. https://example.example.com
lang: zh-CN # Waline language. e.g. zh-CN, en-US. See https://waline.js.org/guide/client/i18n.html
emoji: [] # Waline emojis, see https://waline.js.org/guide/features/emoji.html
recaptchaV3Key: wasd # Google reCAPTCHA v3 key. See https://waline.js.org/reference/client/props.html#recaptchav3key
turnstileKey: # Turnstile key. See https://waline.js.org/reference/client/props.html#turnstilekey
# Gitalk comment system. See https://github.com/gitalk/gitalk
gitalk:
clientID: # GitHub Application Client ID
Expand Down
6 changes: 6 additions & 0 deletions layout/_partials/comments/waline.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
(item) => `'${item}'`
).join(','
) %>],
<%- theme.comment.config.waline.recaptchaV3Key &&
`recaptchaV3Key: "${theme.comment.config.waline.recaptchaV3Key}",`;
%>
<%- theme.comment.config.waline.turnstileKey &&
`turnstileKey: "${theme.comment.config.waline.turnstileKey}",`;
%>
});
}
Expand Down

0 comments on commit 616f9d6

Please sign in to comment.