Giter Club home page Giter Club logo

mkdocs-mermaid-plugin's Introduction

mkdocs-markdownextradata-plugin

A MkDocs plugin that render meraid graph to mermaid style

Installation

Install the package with pip:

pip install mkdocs-mermaid-plugin

Usage

Enable this plugin in your mkdocs.yml:

plugins:
    - markdownmermaid

extra_javascript:
    - https://unpkg.com/[email protected]/dist/mermaid.min.js

Note: Don't forget to include the mermaid.min.js (local or remotely) in your mkdocs.yml

More information about plugins in the MkDocs documentation

mkdocs-mermaid-plugin's People

Contributors

peterjclaw avatar pugong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mkdocs-mermaid-plugin's Issues

NameError: name 'unicode' is not defined

Please add a Python version query to the file "plugin.py" for the "Return Value". Otherwise the following error will be displayed under Python 3.x, when starting the server:
"NameError: name 'unicode' is not defined"

The following variants have to be considered:
in python2.x:
return unicode(soup, 'utf-8')

in python3.x:
return str(soup.encode('utf-8'))

Thanks
Patrick

Add a description on GitHub

Hi, your plugin is listed in the MkDocs Plugins wiki page, and therefore was added to https://github.com/pawamoy/best-of-mkdocs (section images, tables, charts).
It would help if you could add a description on your GitHub repository ๐Ÿ™‚
If this project is not maintained, I can hardcode a description in the best-of list, just let me know ๐Ÿ‘

NameError: name 'unicode' is not defined

I did a fresh install and got the unicode is not defined error.

Mermaid2 solved this issue with the this commit. It's a compatibility issue with Python 3.

When mkdocs build is run the following output takes place.

INFO    -  Cleaning site directory 
INFO    -  Building documentation to directory: /.../site 
ERROR   -  Error building page 'index.md': name 'unicode' is not defined 
...
.../lib/python3.7/site-packages/markdownmermaid/plugin.py", line 22, in on_post_page
    return unicode(soup)
NameError: name 'unicode' is not defined

Is this project still actively maintained?

Hi @pugong,

Asking because the published version on PyPi is outdated and some good PRs are waiting to be merged for months.
I'm interested in MkDocs MermaidJS integration and if this repo is not actively maintained, I propose myself to keep developing it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.