configure tluma.ai#515
Conversation
There was a problem hiding this comment.
Code Review
This pull request integrates the tluma.ai widget into the Docusaurus configuration by loading its script in production and adding its configuration to the head tags. The reviewer suggested conditionally injecting the configuration head tags only in production to match the script loading behavior and avoid polluting the global scope in development.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| headTags: [ | ||
| { | ||
| tagName: 'script', | ||
| innerHTML: `window.tlumaConfig = { | ||
| source: 'harperfast/documentation', | ||
| theme: 'auto', | ||
| button: 'bottom-right', | ||
| };`, | ||
| }, | ||
| ], |
There was a problem hiding this comment.
The tluma.ai widget script is only loaded in production (process.env.NODE_ENV === 'production'), but its configuration (window.tlumaConfig) is currently injected into the head tags in all environments, including development. To keep the environments consistent and avoid polluting the global scope with unused configuration in development, we should conditionally inject the headTags only in production.
...(process.env.NODE_ENV === 'production'
? {
headTags: [
{
tagName: 'script',
innerHTML: `window.tlumaConfig = {
source: 'harperfast/documentation',
theme: 'auto',
button: 'bottom-right',
};`,
},
],
}
: {}),|
I tried this locally; the service seems dead. There is a 401 error when it tries accessing github. 🤷♂️ i'll close but we can try this again another time. |
🧹 Preview CleanupThe preview deployment for this PR has been removed. |
https://tluma.ai/add-to-docusarus