bit-docs-prettify

0.4.2 • Public • Published

bit-docs-prettify

A bit-docs plugin that makes source-code snippets in HTML prettier.

Powered by https://github.com/google/code-prettify.

A working demonstration is available at https://glitch.com/edit/#!/bit-docs-prettify.

Usage

Add bit-docs-prettify as a dependency to your project's package.json, under the bit-docs section:

{
  "name": "your-project",
  ...
  "bit-docs": {
    "dependencies": {
      "bit-docs-prettify": "*"
    },
    ...
  }
}

Now use the bit-docs command-line tool to install the added plugin dependency:

./node_modules/bit-docs/bin/bit-docs

Your project should now support syntax highlighting of source-code snippets in the following languages:

javascript, js, clike, css, markup, xml, html, mathml, svg

Use the following HTML code to trigger syntax highlighting of a source-code snippet:

<pre><code class="language-javascript">...</code></pre>

You can replace language-javascript with an option from the list of supported languages above, like language-js.

Contributing

Want to help make bit-docs-prettify even better? See CONTRIBUTING.md.

Looking for a changelog? Try the releases page on GitHub.

Readme

Keywords

Package Sidebar

Install

npm i bit-docs-prettify

Weekly Downloads

4

Version

0.4.2

License

MIT

Unpacked Size

11.3 kB

Total Files

10

Last publish

Collaborators

  • justinbmeyer
  • mickmcgrath13
  • christopherjbaker
  • rlmcneary2