I'm trying to add the wowhead tooltips to a docusaurus page.
The wowhead documentation suggests you need to add the following to your <head>
section:
<script>const whTooltips = {colorLinks: true, iconizeLinks: true, renameLinks: true};</script>
<script src="https://wow.zamimg.com/widgets/power.js"></script>
I can add the https://wow.zamimg.com/widgets/power.js
fine using the scripts configuration option which works fine with defer or async:
module.exports = {
// Snipped rest of configuration
scripts: [
{
src:
'https://wow.zamimg.com/widgets/power.js',
defer: true,
},
],
For the inline portion <script>const whTooltips = {colorLinks: true, iconizeLinks: true, renameLinks: true};</script>
I have tried using a <Head>
component in my index.js <Layout>
section and had no success.
How can I add this inline script properly to docusaurus so it loads before the wowhead script?