gitbook-plugin-component
A block to define an UI component demo in an iframe together with a syntax highlighted html code block.
Last updated 2 years ago by emolr .
Original npm · Tarball · package.json
$ cnpm install gitbook-plugin-component 
SYNC missed versions from official npm registry.

Gitbook plugin component

With this plugin, a book can contain UI component demos. It takes content of the block and creates and inject content to an resizable iframe, and prints a codeblock for documentation purpose.

How to use it?

To use the component plugin in your Gitbook project, add the component plugin to the book.json file, then install plugins using gitbook install.

{
    "plugins": ["component"]
}

Component format

A component consists of a single block, in this example it's demonstrating the use of a web component, but it could be anything.

{% component %}
<my-element>I'm an webcomponent, rendered in an iframe loading my own script.</my-element>
<script src="/assets/my-element.js"></script>
{% endcomponent %}

If you are writing ui documentation using gitbook, you might like some of my other plugins:

Current Tags

  • 0.0.3                                ...           latest (2 years ago)

3 Versions

  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 2
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |