1.0.5 • Published 3 years ago

halfmoon-highlight v1.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

Halfmoon Highlight

The highlight.js theme found in the Halfmoon documentation.

Installation

Install the package with npm.

npm install halfmoon-highlight

Then, import it as a module.

import 'halfmoon-highlight';

The styles are also available from CDN.

<link href="https://cdn.jsdelivr.net/npm/halfmoon-highlight" rel="stylesheet" />

<!-- OR -->

<link href="https://unpkg.com/halfmoon-highlight" rel="stylesheet"/>

Usage

Install highlight.js and call the initialisation method.

hljs.initHighlightingOnLoad();

Then, include your code inside <pre> and <code> tags.

<pre>
	<code class="js">
		console.log('Hello world!');
	</code>
</pre>

If you need help, take a look at the highlight.js documentation.

Cards

Using the .is-card class on a <pre> tag will add the container styles from the Halfmoon documentation.

<pre class="is-card">
	<code class="js">
		console.log('Hello world!');
	</code>
</pre>

This should be used if the code block is part of a .card component.

License

MIT

1.0.5

3 years ago

1.0.2

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago