docusaurus-plugin-cody
Version:
A plugin that implements the Cody AI widget
27 lines (25 loc) • 780 B
JavaScript
module.exports = function (context, options) {
return {
name: 'cody-plugin',
injectHtmlTags() {
return {
headTags: [
{
tagName: 'script',
attributes: {
type: 'text/javascript',
async: true,
src: 'https://trinketsofcody.com/cody-widget.js',
},
},
{
tagName: 'script',
innerHTML: `
window.codySettings = ${JSON.stringify(options)};
`,
},
],
};
},
};
};