Skip to content

hikerpig/gatsby-remark-pintora

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to gatsby-remark-pintora 👋

Version License: MIT

This plugin adds diagrams using pintora during server-side rendering. So you don't have to include a runtime dependency of pintora.

Pintora is faster than Mermaid.js in CLI, since you don't have to start a headless browser to generate images.

Install

In your gatsby project:

npm install --save gatsby-remark-pintora @pintora/cli

How to Use

This plugin processes markdown code blocks. If you have any other plugins which do that such as syntax highlighters, make sure you import this before those plugins.

Add the plugin to your gatsby-config.js.

{
  plugins: [
    {
      resolve: 'gatsby-transformer-remark',
      options: {
        plugins: [
          {
            resolve: 'gatsby-remark-pintora',
            options: {
              // language: 'pintora',
              // theme: 'default',
              // backgroundColor: '#ffffff',
            }
          }
        ]
      }
    }
  ]
}

Now you can use pintora in your markdown:

```pintora
activityDiagram
  start
  :Install Plugin;
  :Configure;
  :Make beautiful and structured diagrams;
  end

And it will be replaced with inline svg:

output example

Author

Acknowledge

This plugin is inspired by gatsby-remark-mermaid | Gatsby.


This README was generated with ❤️ by readme-md-generator

About

Add diagrams using pintora and server-rendering

Resources

License

Stars

Watchers

Forks

Packages

No packages published