Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,28 @@ module.exports = async function createConfigAsync() {
scripts: [
{ src: "/js/sine-waves.min.js", async: true },
"/js/matomo-agent.js",
'/js/custom-script.js',
{
async: true,
src: 'https://widget.kapa.ai/kapa-widget.bundle.js',
'data-website-id': '7da3a42b-98f7-4af5-85e9-771d51c21796',
'data-modal-title': 'Apache Pulsar AI Assistant',
'data-project-name': 'Apache Pulsar',
'data-project-logo': 'https://pbs.twimg.com/profile_images/875130220474359809/wFcLUbwd_400x400.jpg',
'data-project-color': '#FFFFFF',
'data-modal-open-by-default': 'true',
'data-bot-protection-mechanism': 'hcaptcha',
'data-modal-override-open-id': 'ask-ai-input',
'data-modal-override-open-class': 'search-input',
'data-user-analytics-fingerprint-enabled': 'true',
'data-button-text-color': '#136EC4',
'data-modal-example-questions-title': 'Try asking me...',
'data-modal-example-questions': 'How to create a topic?,How does message retention work?,What is a Pulsar broker?,How does geo-replication work?',
'data-modal-disclaimer': 'This is a custom LLM with access to all Pulsar documentation.',
'data-consent-required': true,
'data-consent-screen-disclaimer': "By clicking "I agree, let's chat", you consent to the use of the AI assistant in accordance with kapa.ai's Privacy Policy. This service uses reCAPTCHA, which requires your consent to Google Privacy Policy and Terms of Service.",
'data-user-analytics-cookie-enabled': false,
}
],
clientModules: [require.resolve("./matomoClientModule.ts")],
stylesheets: [
Expand Down
4 changes: 4 additions & 0 deletions static/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ RewriteRule "^contribute/version-policy/?$" "/contribute/release-policy" [R=301,
RewriteRule "^coding-guide/?$" "/contribute/develop-coding-conventions" [R=301,DPI,L]
RewriteRule "^contributing/?$" "/contribute" [R=301,DPI,L]
RewriteRule "^pulsar-manager-release-notes/?$" "/release-notes" [R=301,DPI,L]

<IfModule mod_headers.c>
Header set Content-Security-Policy "script-src 'self' widget.kapa.ai www.google.com https://hcaptcha.com https://*.hcaptcha.com https://www.gstatic.com 'unsafe-inline' 'unsafe-eval'; connect-src 'self' proxy.kapa.ai kapa-widget-proxy-la7dkmplpq-uc.a.run.app metrics.kapa.ai https://hcaptcha.com https://*.hcaptcha.com www.google.com; frame-src 'self' www.google.com https://hcaptcha.com https://*.hcaptcha.com; style-src 'self' 'unsafe-inline' https://hcaptcha.com https://*.hcaptcha.com;"
</IfModule>