Search code examples
javascriptdocusaurus

Adding Bootstrap JavaScript to Docusaurus but having issues


Got the JavaScript in the head of the document. Great.

BUT the bootstrap components I'm rendering in Docusaurus, whilst styled correctly, aren't affected by the Bootstrap minified file I'm importing into the project. It needs to be put in the footer and I've been banging my head against the wall.

Do I need to add Bootstrap as a plugin to get it working? So dropdowns etc are working etc.

Any help or guidance greatly appreciated!

Kind regards,

Kurtis


Solution

  • Found the bar-steward!

    https://v2.docusaurus.io/docs/lifecycle-apis/#injecthtmltags

    Goes to show that "reading the docs" really can help when Google fails 🤣