Skip to content

mruge/gitbook-plugin-blockLabels

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"
        }
    }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published