0.1.4 • Published 4 years ago

gitbook-plugin-blocklabels v0.1.4

Weekly downloads
1
License
Apache 2
Repository
github
Last release
4 years ago

Label Objects in the Document

  • Applies a (label) around blocks of text, images, or tables.
  • Adds the Header and Footer to PDF

Theme information copied from https://github.com/GitbookIO/theme-default

Install

Add the below to your book.json file, then run gitbook install :

{
    "plugins": ["blocklabel"]
}

Usage

You can mark paragraphs and basic markdown shapes by enclosing them in the following label tag

{% label %}
This section needs to be marked with a label
{% endlabel %}

You cannot mark nested blocks or code blocks. To accomplish that, insert an empty block section directly below the target section and apply the labelPrev argument

component mydiagram

{% label labelPrev='img', label='Draft' %} {% endlabel %}

The value of labelPrev currently has no effect, it was added for the future feature of specifying the type of the previous object, currently only supports blocks that render as IMG in the final html.

Configuration

Add the following to book.json

If defaultLabel is an empty string, or the config is not defined, only blocks will be labeled.

"pluginsConfig": {
        "blocklabels": {
            "defaultLabel": "IMPORTANT",
            "header": "MY CUSTOM HEADER",
            "footer": "My Custom Footer"
        }
    }
0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

5 years ago