All Projects → excalidraw → Gatsby Embedder Excalidraw

excalidraw / Gatsby Embedder Excalidraw

Licence: mit
🤴 Custom transformer to embed Excalidraw diagrams

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Gatsby Embedder Excalidraw

Gh Card
GitHub Repository Card for Any Web Site
Stars: ✭ 1,154 (+2464.44%)
Mutual labels:  markdown, svg, embed
Gatsby Remark Embedder
Gatsby Remark plugin to embed well known services by their URL.
Stars: ✭ 245 (+444.44%)
Mutual labels:  gatsby, markdown, embed
Gatsby Theme Code Notes
A Gatsby theme for publishing code-related notes to your website
Stars: ✭ 370 (+722.22%)
Mutual labels:  gatsby, markdown
Markdeep
Official public Markdeep source archive
Stars: ✭ 373 (+728.89%)
Mutual labels:  markdown, diagram
Wavedrom.github.io
Digital timing diagram editor
Stars: ✭ 453 (+906.67%)
Mutual labels:  svg, diagram
Github Profilinator
🚀 This tool contains mini GUI components that you can hook together to automatically generate markdown code for a perfect readme.
Stars: ✭ 225 (+400%)
Mutual labels:  gatsby, markdown
Gatsby Digital Garden
🌷 🌻 🌺 Create a digital garden with Gatsby
Stars: ✭ 291 (+546.67%)
Mutual labels:  gatsby, markdown
Gatsby Starter Bee
🐝Full Package | Simple | Fresh UI | Blog Template :: Let's start to blogging with gatsby-starter-bee!
Stars: ✭ 416 (+824.44%)
Mutual labels:  gatsby, markdown
Blog
Code for my personal blog built with Gatsby
Stars: ✭ 167 (+271.11%)
Mutual labels:  gatsby, markdown
Gatsby Gitbook Starter
Generate GitBook style modern docs/tutorial websites using Gatsby + MDX
Stars: ✭ 700 (+1455.56%)
Mutual labels:  gatsby, markdown
Tinacms
Open source editor that brings visual editing into React websites. A developer-centric CMS to build contextual and intuitive editing experience without sacrificing code quality.
Stars: ✭ 6,804 (+15020%)
Mutual labels:  gatsby, markdown
Jsplumb
Visual connectivity for webapps
Stars: ✭ 6,758 (+14917.78%)
Mutual labels:  svg, diagram
Docs
Repository of Twilio SendGrid's product documentation.
Stars: ✭ 221 (+391.11%)
Mutual labels:  gatsby, markdown
Joint
JavaScript diagramming library
Stars: ✭ 3,509 (+7697.78%)
Mutual labels:  svg, diagram
Gatsby Starter Morning Dew
🚀 A Gatsby theme/starter to build lightning-fast blog/websites
Stars: ✭ 186 (+313.33%)
Mutual labels:  gatsby, markdown
Github Profile Readme Generator
🚀 Generate GitHub profile README easily with the latest add-ons like visitors count, GitHub stats, etc using minimal UI.
Stars: ✭ 7,812 (+17260%)
Mutual labels:  gatsby, markdown
Blog
My blog created with React, Gatsby & Markdown
Stars: ✭ 29 (-35.56%)
Mutual labels:  gatsby, markdown
Mdx Deck
♠️ React MDX-based presentation decks
Stars: ✭ 10,487 (+23204.44%)
Mutual labels:  gatsby, markdown
Gatsby Remark Oembed
A GatsbyJS Plugin that transforms oembed links into its corresponding embed code.
Stars: ✭ 154 (+242.22%)
Mutual labels:  gatsby, markdown
Gatsby Starter Deck
🗣 Create presentations using Gatsby, React & Markdown.
Stars: ✭ 522 (+1060%)
Mutual labels:  gatsby, markdown

gatsby-embedder-excalidraw

This custom transformer for gatsby-remark-embedder allows you to embed Excalidraw diagrams in Markdown content simply by pasting an Excalidraw link in the source.

The code for this library is lifted from this directory in the excalidraw-blog Gatsby site. All credit for this transformer goes to those authors. I was inspired to do this when I saw Alex Luong's tweet about making this functionality into a gatsby-remark-excalidraw plugin.

Installation

npm install gatsby-embedder-excalidraw

Usage

// gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: 'gatsby-transformer-remark',
      options: {
        plugins: [
          {
            resolve: 'gatsby-remark-embedder',
            options: {
              customTransformers: [require('gatsby-embedder-excalidraw')]
            }
          }
        ]
      }
    }
  ]
};

Example

This guide will show you how to get up and running with gatsby-embedder-excalidraw in the fewest steps possible. It uses gatsby-plugin-mdx to take advantage of its awesome default behaviour of automatically creating pages based on MDX files in src/pages.

Install dependencies

First, install gatsby and its dependencies:

npm install gatsby react react-dom

Next, install gatsby-plugin-mdx and its dependencies:

npm install gatsby-plugin-mdx @mdx-js/mdx @mdx-js/react

Configure plugins

Add gatsby-plugin-mdx to your Gatsby config:

// gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: 'gatsby-plugin-mdx'
    }
  ]
};

Install the gatsby-remark-embedder plugin and this Excalidraw transformer gatsby-embedder-excalidraw:

npm install gatsby-remark-embedder gatsby-embedder-excalidraw

Add gatsby-remark-embedder as a Gatsby remark plugin for gatsby-plugin-mdx. In your gatsby-remark-embedder options, add gatsby-embedder-excalidraw as a custom transformer:

// gatsby-config.js
module.exports = {
  plugins: [
    {
-     resolve: 'gatsby-plugin-mdx'
+     resolve: 'gatsby-plugin-mdx',
+     options: {
+       gatsbyRemarkPlugins: [
+         {
+           resolve: 'gatsby-remark-embedder',
+           options: {
+             customTransformers: [require('gatsby-embedder-excalidraw')]
+           }
+         }
+       ]
+     }
    }
  ]
};

Create a drawing

Head over to Excalidraw and draw something! Once you're satisfied, you can find a shareable link to your drawing in the export dialog, accesible from the icon in the top left corner of the page.

link

Embed your drawing

Create an MDX page at src/pages/index.mdx and add a link to an Excalidraw diagram:

# Fox grab flowchart

Fox's followups after a grab depend on your opponent's DI:

https://excalidraw.com/#json=5695519967936512,sLhjTgn1_wB1iVLLquX6Fg

Voila! 🎉 https://excalidraw-embed.trevorblades.com

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].