title: How do I embed global React components in Docusaurus v2?
body: <p>I see that it is possible to embed React components with MDX:<br>
  <a href="https://v2.docusaurus.io/docs/markdown-features/#embedding-react-components-with-mdx" rel="nofollow noreferrer">https://v2.docusaurus.io/docs/markdown-features/#embedding-react-components-with-mdx</a></p>
  
  <p>However, this method works for a specific page. How can I make it work for all markdown files in the docs? I am trying to add a similar component as in the link above to change the style of some inline text. I tried to edit src/pages/index.js but it didn't work.</p>
  
  <pre><code>const HighlightGreen = (children) =&gt; (
    &lt;span
      style={{
        backgroundColor: '#00a400', // green,
        borderRadius: '2px',
        color: '#fff',
        padding: '0.2rem',
      }}&gt;
      {children}
    &lt;/span&gt;
  );
  </code></pre>