1

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.

2
  • 6
    What did you try to make the module work? Commented Jun 23, 2020 at 9:25
  • Split paragraph with an additional newline Commented Jun 24, 2020 at 8:24

2 Answers 2

2

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" 
/>
Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.