Search code examples
docusaurus

How to add a top alert banner on Docusaurus 1.x?


I want to show some global message on my Docusaurus site. Something like:

example

https://codesandbox.io/s/duudl

https://next.ant.design/components/alert/

Is this possible?


Solution

  • You will have to inject the DOM via scripts. An example is React Native website where they injected feedback banners at the bottom of the page - https://facebook.github.io/react-native/docs/getting-started

    Look at their repo and the script they used.