forked from meteor/meteor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc7febd
commit 1c7a427
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
hexo.extend.filter.register('after_render:html', function(html) { | ||
const scriptTag = ` | ||
<script async | ||
src="https://widget.kapa.ai/kapa-widget.bundle.js" | ||
data-website-id="64051b0e-d79f-4fe7-b3ca-ff5c84075693" | ||
data-project-name="Meteor" | ||
data-project-color="#101926" | ||
data-project-logo="https://avatars.githubusercontent.com/u/789528?s=200&v=4” | ||
data-modal-disclaimer=“This is a custom LLM for answering questions about Meteor. Answers are based on the contents of the docs, answered forum posts, YouTube videos and GitHub issues. Please note that answers are generated by AI and may not be fully accurate, so please use your best judgement." | ||
></script> | ||
`.trim(); | ||
|
||
if (html.indexOf('</body>') !== -1) { | ||
return html.replace('</body>', scriptTag + '</body>'); | ||
} | ||
|
||
return html; | ||
}); |