0.0.5 • Published 12 months ago

honkit-plugin-exercise v0.0.5

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
12 months ago

HonKit plugin: exercise

Formats and numbers each exercise. Numbering is automatic and starts at 1. An exercise can be labelled to allow for cross-referencing.

Installation

Install via npm:

npm install honkit-plugin-exercise --save-dev

Add the plugin to your book.json:

{
    plugins: [ "exercise" ]
}

Usage

An exercise is added by the block:

{% exercise %}{% endexercise %}
Insert your exercise text here.

To help cross-reference an exercise, you can add a label. The label text should not have any white spaces.

{% exercise label="my_label" %}{% endexercise %}
Insert your exercise text here.

For example, the following exercise blocks

{% exercise %}{% endexercise %}
What Is the airspeed velocity of an unladen swallow?

{% exercise label="a_label" %}{% endexercise %}
What do you mean? An African or a European swallow?

would be rendered as

Unladen swallow

Cross-reference an exercise like how you cross-reference a section in a Markdown file. In the above example, the exercise having the label "a_label" can be cross-referenced as:

[this exercise](/path/to/file.md#a_label)
0.0.5

12 months ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago