I'm new to Docusaurus and wonder is there a way to embed GitHub gists into docusaurus docs?
I found this module: https://github.com/winoteam/docusaurus-gist-embed but I don't seem to get it to work.
I'm new to Docusaurus and wonder is there a way to embed GitHub gists into docusaurus docs?
I found this module: https://github.com/winoteam/docusaurus-gist-embed but I don't seem to get it to work.
Easy one, install this package in your Docusaurus project
https://www.npmjs.com/package/react-gist
the in your markdown add the import
statement along with a Gist JSX code with your Gist id as shown below:
---
title: yourtitle
---
import Gist from 'react-gist';
<Gist id="9b9985dbf8163ade22b71f2ccf20cb51"
/>
Docusaurus 2 is based on MDX so any react component you put in the markdown should render, including an iframe with a gist or whatever you want.