Skip to content

Commit f04b9ac

Browse files
authored
docs: Integrate Beamer release notes tool (#3468)
1 parent d717704 commit f04b9ac

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docusaurus.config.js

+24
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,30 @@ module.exports = {
367367
versions: VERSIONS_JSON,
368368
},
369369
],
370+
function (context, options) {
371+
return {
372+
name: 'beamer',
373+
injectHtmlTags({ content }) {
374+
// Only inject Beamer when deployed to production, so we don't use up Beamer "users"
375+
if (process.env.NODE_ENV === 'production') {
376+
return {
377+
// For performance, Beamer recommends injecting these scripts at the very bottom of the <body>
378+
// Thus, custom plugin is required here to use postBodyTags
379+
postBodyTags: [
380+
`<script>var beamer_config = { product_id : 'mUvQtqly31065' };</script>`,
381+
{
382+
tagName: 'script',
383+
attributes: {
384+
src: 'https://app.getbeamer.com/js/beamer-embed.js',
385+
defer: 'defer',
386+
},
387+
},
388+
],
389+
};
390+
}
391+
},
392+
};
393+
},
370394
],
371395
customFields: {},
372396
themes: [],

0 commit comments

Comments
 (0)