• HOME
  • USER GUIDE
  • SHOWCASE
  • ABOUT
  • Reader-Facing Features

    Headings

    Heading level 3

    ...

    Heading level 6

    Headings

    You can prepend the heading text with 1-6 # characters to indicate headings of levels 1-6.

    CODE:

    ### Heading level 3
    ...
    ###### Heading level 6
    

    OUTPUT:

    Heading level 3

    ...

    Heading level 6

    MarkBind auto-generates anchors for all headings.
    If the heading text is Foo Bar (Goo), the ID of the generated anchor will be foo-bar-goo (all lower case, special characters ommitted, joined by -).

    Alternative syntax, more info: https://www.markdownguide.org/basic-syntax#headings

    ```markdown ### Heading level 3 ... ###### Heading level 6 ```

    Heading level 3

    ...

    Heading level 6
    Text Styles

    Bold, Italic, Bold and Italic, Inline Code Strike through, Super Bold, Underline, Highlight, Dim, Superscript, Subscript

    Text Styles

    Markdown text styles:

    CODE:

    **Bold**, _Italic_, ___Bold and Italic___, `Inline Code`
    

    OUTPUT:

    Bold, Italic, Bold and Italic, Inline Code

    Additional syntax from GFMD:

    CODE:

    ~~Strike through~~
    

    OUTPUT:

    Strike through

    Syntax added by MarkBind:

    CODE:

    ****Super Bold****, !!Underline!!, ==Highlight==, %%Dim%%, Super^script^, Sub~script~
    

    OUTPUT:

    Super Bold, Underline, Highlight, Dim, Superscript, Subscript

    Alternative syntax: https://www.markdownguide.org/basic-syntax#emphasis

    ```markdown **Bold**, _Italic_, ___Bold and Italic___, `Inline Code` ~~Strike through~~, ****Super Bold****, !!Underline!!, ==Highlight==, %%Dim%%, Super^script^, Sub~script~ ```

    Bold, Italic, Bold and Italic, Inline Code Strike through, Super Bold, Underline, Highlight, Dim, Superscript, Subscript

    Blockquotes

    Blockquote, first paragraph

    Second paragraph

    Nested blockquote

    Blockquotes

    CODE:

    Normal text
    > Blockquote, first paragraph
    >
    > Second paragraph
    >> Nested quoteblock
    

    OUTPUT:

    Normal text

    Blockquote, first paragraph

    Second paragraph

    Nested quoteblock

    Alternatively, you can use <blockquote> tags:

    CODE:

    Normal text
    <blockquote>
    Blockquote, first paragraph
    
    Second paragraph
    <blockquote>
    Nested blockquote
    </blockquote>
    </blockquote>
    

    OUTPUT:

    Normal text

    Blockquote, first paragraph

    Second paragraph

    Nested blockquote

    More info: https://www.markdownguide.org/basic-syntax#blockquotes-1

    > Blockquote, first paragraph
    >
    > Second paragraph
    >> Nested blockquote
    

    Blockquote, first paragraph

    Second paragraph

    Nested blockquote

    Lists
    1. Item 1
      1. Sub item 1.1
      2. Sub item 1.2
    • Item 2
      • item 2.1
    • Item 3
    • Item 4

    Lists

    Unordered lists:

    CODE:

    * Item 1
      * Sub item 1.1
      * Sub item 1.2<br>
        Second line
        * Sub item 1.2.1
    * Item 2
    * Item 3
    

    OUTPUT:

    • Item 1
      • Sub item 1.1
      • Sub item 1.2
        Second line
        • Sub item 1.2.1
    • Item 2
    • Item 3

    Ordered lists:

    CODE:

    1. Item 1
       1. Sub item 1.1
       1. Sub item 1.2
    1. Item 2
    1. Item 3
    

    OUTPUT:

    1. Item 1
      1. Sub item 1.1
      2. Sub item 1.2
    2. Item 2
    3. Item 3
    You can also start an ordered list at a particular number by changing the first number
    Example

    CODE:

    10. Item 1
       1. Sub item 1.1
       1. Sub item 1.2
    1. Item 2
    

    OUTPUT:

    1. Item 1
    2. Sub item 1.1
    3. Sub item 1.2
    4. Item 2
    !

    More info on above list types: https://www.markdownguide.org/basic-syntax#lists

    Task lists (from GFMD):

    CODE:

    - [ ] Item 1
       - [ ] Sub item 1.1
       - [x] Sub item 1.2
    - [x] Item 2
    - [ ] Item 3
    

    OUTPUT:

    • Item 1
      • Sub item 1.1
      • Sub item 1.2
    • Item 2
    • Item 3

    Radio-button lists:

    CODE:

    - ( ) Item 1
    - ( ) Item 2
    - (x) Item 3
    

    OUTPUT:

    1. Item 1
       1. Sub item 1.1
       1. Sub item 1.2
    * Item 2
      * item 2.1
    - [ ] Item 3
    - [x] Item 4
    - ( ) Item 5
    
    1. Item 1
      1. Sub item 1.1
      2. Sub item 1.2
    • Item 2
      • item 2.1
    • Item 3
    • Item 4
    Code
    <foo>
      <bar type="name">goo</bar>
    </foo>
    

    Syntax coloring for inline code: <bar type="name">goo</bar> too!

    Code

    Themes

    MarkBind can present formatted code blocks, be it fenced or inline, with either light or dark themes. The default is dark.

    Refer here for configuring MarkBind to use a specific theme for the code blocks.

    Fenced Code

    MarkBind provides several features, some of which are added on top of the existing functionality of Markdown's fenced code blocks.

    More info: https://www.markdownguide.org/extended-syntax#fenced-code-blocks

    Features:

    • Syntax coloring
    • Line numbering
    • Line highlighting
    • Code block headers
    Syntax coloring

    To enable syntax coloring, specify a language next to the backticks before the fenced code block.

    CODE:

    ```xml
    <foo>
      <bar type="name">goo</bar>
    </foo>
    ```
    

    OUTPUT:

    <foo>
      <bar type="name">goo</bar>
    </foo>
    
    Line numbering

    Line numbers are provided by default. To hide line numbers, add the class no-line-numbers to the code block as below

    CODE:

    ```xml {.no-line-numbers}
    <foo>
      <bar type="name">goo</bar>
    </foo>
    ```
    

    OUTPUT:

    <foo>
      <bar type="name">goo</bar>
    </foo>
    

    You can have your line numbers start with a value other than 1 with the start-from attribute.

    CODE:

    ```js {start-from=6}
    function add(a, b) {
        return a + b;
    }
    ```
    

    OUTPUT:

    function add(a, b) {
        return a + b;
    }
    
    Line highlighting

    To highlight lines, add the attribute highlight-lines as shown below.

    You can specify highlighting in many different ways, depending on how you want it to be. There are two main variants:

    Text-only highlighting

    To highlight only the text portion of the line, you can just use the line numbers as is.

    For ranges of lines, join the two line numbers with a dash sign (-).

    Whole-line highlighting

    If you wish to highlight a full line (including whitespaces) or ranges of it, you can leverage MarkBind's own line-slice syntax. Line-slices are in the form of lineNumber[:], e.g. 2[:].

    This variant's format is very similar to the previous, but instead use line-slices rather than line numbers.

    For ranges, you only need to use line-slices on either ends.

    CODE:

    ```java {highlight-lines="1,3[:],6-8,10[:]-12"}
    import java.util.List;
    
    public class Inventory {
        private List<Item> items;
    
        public int getItemCount(){
            return items.size();
        }
        
        public bool isEmpty() {
            return items.isEmpty();
        }
    
        //...
    }
    ```
    

    OUTPUT:

    import java.util.List;
    
    public class Inventory {
        private List<Item> items;
    
        public int getItemCount(){
            return items.size();
        }
        
        public bool isEmpty() {
            return items.isEmpty();
        }
    
        //...
    }
    
    Heading

    To add a heading, add the attribute heading with the heading text as the value, as shown below.

    CODE:

    ```xml {heading="Heading title"}
    <foo>
      <bar type="name">goo</bar>
    </foo>
    ```
    

    OUTPUT:

    Heading title
    <foo>
      <bar type="name">goo</bar>
    </foo>
    

    Headings support inline Markdown, except for Inline Code and Dim text styles.

    CODE:

    ```{heading="**Bold**, _Italic_, ___Bold and Italic___, ~~Strike through~~, ****Super Bold****, !!Underline!!, ==Highlight==, :+1: :exclamation: :x: :construction:<br>We support page breaks"}
    <foo></foo>
    ```
    

    OUTPUT:

    Bold, Italic, Bold and Italic, Strike through, Super Bold, Underline, Highlight, πŸ‘ ❗️ ❌ 🚧
    We support page breaks
    <foo></foo>
    
    Using multiple features

    You can also use multiple features together, as shown below.

    CODE:

    ```xml {highlight-lines="2" heading="Heading title"}
    <foo>
      <bar type="name">goo</bar>
    </foo>
    ```
    

    OUTPUT:

    Heading title
    <foo>
      <bar type="name">goo</bar>
    </foo>
    

    Inline Code

    Syntax coloring

    MarkBind can apply syntax-coloring on inline code too.

    CODE:

    Consider the xml code `<bar type="name" cwf="C:\Users\ZeYu\Desktop\markbind\docs\userGuide\syntax\codeAndOutput.md">goo</bar>`{.xml},<br>
    or the java code `public static void main(String[] args)`{.java}.
    

    OUTPUT:

    Consider the xml code <bar type="name">goo</bar>,
    or the java code public static void main(String[] args).

    ```` ```xml goo ``` ```` ``` `goo`{.xml} ```
    <foo>
      <bar type="name">goo</bar>
    </foo>
    

    Syntax coloring for inline code: <bar type="name">goo</bar> too!

    Horizontal Rules

    Horizontal Rules

    Use three or more asterisks (***), dashes (---), or underscores (___) to indicate a horizontal line.

    CODE:

    *****
    -----
    ______________
    

    OUTPUT:




    ```markdown ***** ----- ______________ ```

    MarkBind home is at here.

    Basic style:

    CODE:

    MarkBind home is at [here](https://markbind.org).
    

    OUTPUT:

    MarkBind home is at here.

    Reference style links (i.e., specify the URL in a separate place):

    CODE:

    MarkBind home is at [here][1].
    
    [1]: https://markbind.org
    

    OUTPUT:

    MarkBind home is at here.

    More info: https://www.markdownguide.org/basic-syntax#links

    MarkBind home is at [here](https://markbind.org).
    
    MarkBind home is at [here][1].
    
    [1]: https://markbind.org
    

    MarkBind home is at here.

    Footnotes

    1 + 1 = 2 [1]

    Footnotes

    CODE:

    **Normal footnotes:**
    Here is a footnote reference,[^1] and another.[^longnote]
    
    [^1]: Here is the footnote. Footnotes will appear at the bottom of the page.
    
    [^longnote]: Here's one with multiple blocks.
    
        Subsequent paragraphs are indented to show that they
    belong to the previous footnote.
    
    
    **Inline footnotes:**
    Here is an inline note.^[Inlines notes are easier to write, since
    you don't have to pick an identifier and move down to type the
    note.]
    

    OUTPUT:

    Normal footnotes: Here is a footnote reference,[2] and another.[3]

    Inline footnotes: Here is an inline note.[4]

    Normal footnotes won't work when used inside the attributes of markbind components!
    For example, it won't work in the header attribute of panels.

    **Normal footnotes:**
    Here is a footnote reference,[^1] and another.[^longnote]
    
    [^1]: Here is the footnote. Footnotes will appear at the bottom of the page.
    
    [^longnote]: Here's one with multiple blocks.
        Subsequent paragraphs are indented to show that they
    belong to the previous footnote.
    
    1 + 1 = 2 ^[Math]
    Images

    Images

    CODE:

    ![](https://markbind.org/images/logo-lightbackground.png)
    

    OUTPUT:

    URLs can be specified as relative references. More info in: Intra-Site Links ```markdown ![alt text here](https://markbind.org/images/logo-lightbackground.png "title here") ```

    Classes, Attributes & Identifiers
    • Apply to the list item itself like so
      • Curly groups after newlines apply to the closest nested list
    • Curly groups two lines after the last line apply to the top most list

    Classes, Attributes & Identifiers

    Most markdown syntax above this section supports adding classes, attributes and identifiers using pandoc syntax without the need for a wrapper html element.

    The syntax is {.class-name attribute="value" attribute=value #id}, which is placed at different locations depending on the type of markdown.

    CODE:

    Apply classes, attributes, identifiers to block level markdown (eg. paragraphs, headings)
    by leaving a space before '{' {.text-success #attribute-example}
    
    #### heading {.text-info}
    
    --- {.border-danger}
    
    Apply the same to inline markdown (eg. bold text) by
    omitting the **space**{.text-primary .bg-light header="attributes example"}
    <!-- Use inspect element on the **space** word below to see the "header" attribute! -->
    

    OUTPUT:

    Apply classes, attributes, identifiers to block level markdown (eg. paragraphs, headings) by leaving a space before '{'

    heading


    Apply the same to inline markdown (eg. bold text) by omitting the space

    Some other types of markdown have different placements of the curly group {...}.

    Unordered and Ordered lists

    CODE:

    * Apply to the list item itself like so {.text-success #list-item-id}
      * Curly groups after newlines apply to the closest nested list {.text-danger}
    {.bg-light}
    * Curly groups two lines after the last line apply to the top most list
    
    {.alert-info}
    

    OUTPUT:

    • Apply to the list item itself like so
      • Curly groups after newlines apply to the closest nested list
    • Curly groups two lines after the last line apply to the top most list

    Fenced code blocks

    Refer to the above section!

    For a more detailed guide, see: https://www.npmjs.com/package/markdown-it-attrs

    Formatting features listed above this section support this syntax for attributes, classes and identifiers. Those below this section do not.
    add a space before '{' for block level markdown {.class-name attribute="value" attribute=value #id}
    
    don't add a space for **inline**{.text-danger} markdown
    

    For a more detailed guide, see: https://www.npmjs.com/package/markdown-it-attrs

    • Apply to the list item itself like so
      • Curly groups after newlines apply to the closest nested list
    • Curly groups two lines after the last line apply to the top most list
    Tables
    Animal Trainable? Price Remarks
    Ants no 5
    Bees no 20
    Cats yes 100

    Tables

    CODE:

    Animal | Trainable?| Price | Remarks
    :----- | :-------: | ----: | ----
    Ants   | no        | 5     |
    Bees   | no        | 20    |
    Cats|yes|100|
    

    OUTPUT:

    Animal Trainable? Price Remarks
    Ants no 5
    Bees no 20
    Cats yes 100
    • Colons (:) in the 2nd line are optional and they indicates whether to left/center/right-align the values in that column.
    • There is no need to align pipe symbols to be on a vertical line; it's just for aesthetic purposes only.

    More info: https://www.markdownguide.org/extended-syntax#tables

    Animal | Trainable?| Price | Remarks
    :----- | :-------: | ----: | ----
    Ants   | no        | 5     |
    Bees   | no        | 20    |
    Cats|yes|100|
    
    Animal Trainable? Price Remarks
    Ants no 5
    Bees no 20
    Cats yes 100
    Emoji

    πŸ‘ ❗️ ❌ 🚧

    Emoji

    CODE:

    :+1: :exclamation: :x: :construction:
    

    OUTPUT:

    πŸ‘ ❗️ ❌ 🚧

    :+1: :exclamation: :x: :construction:
    

    πŸ‘ ❗️ ❌ 🚧

    Icons

    Icons

    Acknowledgement: Font Awesome icons are provided by Font Awesome under their free license, Glyphicons are provided by Glyphicons via Bootstrap 3, and Octicons are copyright of GitHub.

    MarkBind supports using Font Icons provided by Font Awesome, Glyphicons and GitHub's Octicons.

    The advantage of font icons over emojis is font icons can be styled to fit your needs. e.g.,

    • emoji: Don't judge the πŸ“– by it's cover! πŸ‘Ž
    • font icons: Don't judge the by it's cover!

    The syntax for icons has changed, and the earlier {{ prefix_name }} syntax has been deprecated.
    Please use the new :prefix-name: syntax instead.

    Using Font Awesome Icons
    1. Decide which icon you want to use from the list of available icons.

    2. Construct the MarkBind name for the selected icon by adding the type prefix. Note: Font Awesome has three different styles for their icons, each with their own type prefix. Here is an example from each type:

      • Solid (prefix: fas-) e.g., (actual name file-code, MarkBind name fas-file-code)
      • Regular (prefix: far-) e.g., (actual name file-code, MarkBind name far-file-code)
      • Brands (prefix: fab-): e.g., (actual name github-alt, MarkBind name fab-github-alt)
    3. Insert MarkBind name for the icon enclosed within colons to get the icon in your page.
      Create a **branch**:fas-code-branch: now! β†’ Create a branch now!

    Using Glyphicons
    1. Decide which icon you want to use from list of provided glyphicons.
    2. Insert the name for the icon enclosed within colons to get the icon in your page.
      Move to the right!:glyphicon-hand-right: β†’ Move to the right!

    :glyphicon-hand-right: :fab-github: :fas-home:

    Using Octicons
    1. Decide which icon you want to use from list of available Octicons.
    2. Insert the name for the icon enclosed within colons to get the icon in your page.
      Merge a **pull request** :octicon-git-pull-request: β†’ Merge a pull request
    3. You may also append ~class-name to the end of the octicon name to add class="class-name" property to your Octicon (e.g. :octicon-git-pull-request~icon-large-red: will generate an Octicon of class icon-large-red). You may then add corresponding CSS to {root}/_markbind/layouts/{layout-name}/styles.css to customize the style of your Octicon.
    4. If your background is dark, you may use :octiconlight-*: to render the icon as white.
    Embeds

    Embedded YouTube video:

    Embedded slide deck:

    Embeds

    There are easy ways to embed media content such as YouTube videos and PowerPoint slides.

    Embedding Youtube Videos

    Here are three ways of embedding YouTube videos and one example of how it will look in the page.

    CODE:

    @[youtube](v40b3ExbM0c)
    @[youtube](http://www.youtube.com/watch?v=v40b3ExbM0c)
    @[youtube](http://youtu.be/v40b3ExbM0c)
    

    OUTPUT:

    More media blocks, embedding services and additional options can be found in Markdown-it documentation.

    Embedding Powerpoint Slides (using the embed url from Powerpoint online)

    Here is an example of embedding a PowerPoint slide deck:

    CODE:

    @[powerpoint](https://onedrive.live.com/embed?cid=A5AF047C4CAD67AB&resid=A5AF047C4CAD67AB%212070&authkey=&em=2)
    

    OUTPUT:

    @[youtube](v40b3ExbM0c)
    @[youtube](http://www.youtube.com/watch?v=v40b3ExbM0c)
    @[youtube](http://youtu.be/v40b3ExbM0c)
    
    @[powerpoint](https://onedrive.live.com/embed?cid=A5AF047C4CAD67AB&resid=A5AF047C4CAD67AB%212070&authkey=&em=2)
    

    Embedded YouTube video:

    Embedded slide deck:

    Dates

    CODE:

    {% set base1 = "2019-08-12" %}
    {% set format1 = "DD MM YYYY" %}
    {% set format2 = "ddd Do MM" %}
    {{ base1 | date }} <!-- Mon 12 Aug -->
    {{ base1 | date(format1) }} <!-- 12 08 2019 -->
    {{ base1 | date(format1, 10) }} <!-- 22 08 2019 -->
    {{ base1 | date(format2, 10) }} <!-- Thu 22/08 -->

    OUTPUT:

    Mon 12 Aug
    12 08 2019
    22 08 2019
    Thu 22/08

    {{ "2019-08-12" | date("DD.MM.YYYY", 10) }} <!-- 22.08.2019 -->

    22.08.2019

    Dates

    Markbind supports date formatting and simple calculations as a Nunjucks filter.

    Syntax: {{ baseDate | date(format, daysToAdd) }}

    20 days after 1st Jan 2020:

    {{ "2020-01-01" | date("ddd, Do MMM, YYYY", 20) }} Tue, 21st Jan, 2020

    The baseDate follows the format: YYYY-MM-DD

    The default output format is "ddd D MMM" e.g. Fri 6 Mar

    Using variables

    {% set base1 = "2020-01-01" %}
    {% set format1 = "DD MM YYYY" %}
    {% set format2 = "ddd Do MMM (DD/MM/YYYY)" %}

    {{ base1 | date }} Wed 1 Jan

    Custom formatting

    {{ base1 | date(format1) }} 01 01 2020

    Adding days

    {{ base1 | date(format2, 0) }} Wed 1st Jan (01/01/2020)
    {{ base1 | date(format2, 10) }} Sat 11th Jan (11/01/2020)

    Page variables

    Dates can be supplied using page variables for convenience.

    Inside variables.md or referencing page:

    <variable name="date_pagevar">2020-03-06</variable>
    

    {{ date_pagevar | date(format2) }} Fri 6th Mar (06/03/2020)

    Advanced Formatting

    The output date can be formatted to suit your needs by specifying a format string as an argument to the date filter.

    Default format: "ddd D MMM" e.g. Fri 6 Mar

    Token Output
    D 1
    Do 1st
    DD 01
    M 1
    MM 01
    MMM Jan
    MMMM January
    YY 19
    YYYY 2019

    Full formatting reference available here.

    Example

    CODE:

    {% set base1 = "2019-08-12" %}
    {% set format1 = "DD MM YYYY" %}
    {% set format2 = "ddd Do MM" %}
    {{ base1 | date }} <!-- Mon 12 Aug -->
    {{ base1 | date(format1) }} <!-- 12 08 2019 -->
    {{ base1 | date(format1, 10) }} <!-- 22 08 2019 -->
    {{ base1 | date(format2, 10) }} <!-- Thu 22/08 -->

    OUTPUT:

    Mon 12 Aug
    12 08 2019
    22 08 2019
    Thu 22/08

    {{ "2019-08-12" | date("DD.MM.YYYY", 10) }} <!-- 22.08.2019 -->

    22.08.2019

    Math Formulae

    Solve the following simultaneous equations:

    3 x + y = 11 3x + y = 11 (1)
    2 x 3 + 2 y 3 = 8 \frac{2x}{3} + \frac{2y}{3} = 8 (2)

    Euler's equation e i Ο€ + 1 = 0 e^{i\pi}+1=0 is a beautiful equation.

    Math Formulae

    Markbind supports typesetting TeX math equations. KaTeX is used as a fast math renderer.

    Insert inline equations by enclosing them in round brackets \( ... \).

    Insert display equations by enclosing them in square brackets \[ ... \].

    Insert numbered display equations by enclosing the equation square brackets and the equation number in curly brackets \[ ... \] (1).

    CODE:

    Solve the following simultaneous equations:
    
    \[ 3x + y = 11 \] (1)
    
    \[\frac{2x}{3} + \frac{2y}{3} = 8\] (2)
    
    Euler's equation \( e^{i\pi}+1=0 \) is a beautiful equation.
    

    OUTPUT:

    Solve the following simultaneous equations:

    3 x + y = 11 3x + y = 11 (1)
    2 x 3 + 2 y 3 = 8 \frac{2x}{3} + \frac{2y}{3} = 8 (2)

    Euler's equation e i Ο€ + 1 = 0 e^{i\pi}+1=0 is a beautiful equation.

    If your equation requires special Nunjucks tags like {{ or }},use a raw-endraw block:

    {% raw %}\(e^{{\frac{1}{3}} + 1}\){% endraw %}
    

    More info on allowed symbols: https://katex.org/docs/support_table.html

    
    Solve the following simultaneous equations:
    
    \[ 3x + y = 11 \] (1)
    
    \[\frac{2x}{3} + \frac{2y}{3} = 8\] (2)
    
    Euler's equation \( e^{i\pi}+1=0 \) is a beautiful equation.
    
    

    Solve the following simultaneous equations:

    3 x + y = 11 3x + y = 11 (1)
    2 x 3 + 2 y 3 = 8 \frac{2x}{3} + \frac{2y}{3} = 8 (2)

    Euler's equation e i Ο€ + 1 = 0 e^{i\pi}+1=0 is a beautiful equation.

    Badges

    Primary Success

    Feature Y stable

    Badges

    CODE:

    Normal:
    <span class="badge badge-primary">Primary</span>
    <span class="badge badge-secondary">Secondary</span>
    <span class="badge badge-success">Success</span>
    <span class="badge badge-danger">Danger</span>
    <span class="badge badge-warning">Warning</span>
    <span class="badge badge-info">Info</span>
    <span class="badge badge-light">Light</span>
    <span class="badge badge-dark">Dark</span>
    <br>Pills:
    <span class="badge badge-pill badge-primary">Primary</span>
    <span class="badge badge-pill badge-secondary">Secondary</span>
    <span class="badge badge-pill badge-success">Success</span>
    <span class="badge badge-pill badge-danger">Danger</span>
    <span class="badge badge-pill badge-warning">Warning</span>
    <span class="badge badge-pill badge-info">Info</span>
    <span class="badge badge-pill badge-light">Light</span>
    <span class="badge badge-pill badge-dark">Dark</span>
    

    OUTPUT:

    Normal: Primary Secondary Success Danger Warning Info Light Dark
    Pills: Primary Secondary Success Danger Warning Info Light Dark

    You can use Badges in combination with headings, buttons, links, etc.

    CODE:

    Links:
    <a href="#" class="badge badge-primary">Primary</a>
    <a href="#" class="badge badge-pill badge-warning">Warning</a>
    
    Buttons:
    <button type="button" class="btn btn-primary">
      Difficulty Level <span class="badge badge-light">4</span>
    </button>
    
    Headings:
    
    ### Feature X <span class="badge badge-danger">beta</span> {.no-index}
    ##### Feature Y <span class="badge badge-pill badge-success">stable</span> {.no-index}
    

    OUTPUT:

    Links: Primary Warning

    Buttons:

    Headings:

    Feature X beta

    Feature Y stable

    You can refer to Bootstrap documentation to find more information about Badges.

    <span class="badge badge-primary">Primary</span>
    <span class="badge badge-pill badge-success">Success</span>
    <button type="button" class="btn btn-primary">
      Difficulty Level <span class="badge badge-light">4</span>
    </button>
    

    Primary Success

    Feature Y stable
    Boxes
    default info warning success important wrong tip definition

    Boxes

    Boxes come with different built-in types.

    CODE:

    <box>
        default
    </box>
    <box type="info">
        info
    </box>
    <box type="warning">
        warning
    </box>
    <box type="success">
        success
    </box>
    <box type="important">
        important
    </box>
    <box type="wrong">
        wrong
    </box>
    <box type="tip">
        tip
    </box>
    <box type="definition">
        definition
    </box>
    <box type="info" dismissible>
        dismissible info
    </box>
    <box type="success" header="#### Header :rocket:" icon-size="2x">
    
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
    
      <box type="warning" header="You can use **markdown** here! :pizza:" dismissible>
      Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
      </box>
    </box>
    

    OUTPUT:

    default info warning success important wrong tip definition dismissible info

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    Markbind also supports a light color scheme for boxes

    CODE:

    <box light>
        default light
    </box>
    <box type="info" light>
        info light
    </box>
    <box type="warning" light>
        warning light
    </box>
    <box type="success" light>
        success light
    </box>
    <box type="important" light>
        important light
    </box>
    <box type="wrong" light>
        wrong light
    </box>
    <box type="tip" light>
        tip light
    </box>
    <box type="definition" light>
        definition light
    </box>
    <box type="definition" header="##### Header markdown :rocket:" light>
        definition light with header markdown
    </box>
    

    OUTPUT:

    default light info light warning light success light important light wrong light tip light definition light definition light with header markdown

    MarkBind also supports a seamless style of boxes

    As light and seamless are mutually exclusive styles, light takes priority over seamless.

    CODE:

    <box seamless>
        default seamless
    </box>
    <box type="info" seamless>
        info seamless
    </box>
    <box type="warning" seamless>
        warning seamless
    </box>
    <box type="success" seamless>
        success seamless
    </box>
    <box type="important" seamless>
        important seamless
    </box>
    <box type="wrong" seamless>
        wrong seamless
    </box>
    <box type="tip" seamless>
        tip seamless
    </box>
    <box type="definition" seamless dismissible>
        dismissible definition seamless
    </box>
    <box type="definition" header="##### Header markdown :rocket:" seamless>
        success seamless with header markdown
    </box>
    

    OUTPUT:

    default seamless info seamless warning seamless success seamless important seamless wrong seamless tip seamless dismissible definition seamless success seamless with header markdown

    You can further customize the Box's appearance.

    CODE:

    <box background-color="#ffca6a" border-color="grey" border-left-color="#8b5a01">
    default type, styled as an orange box with a brown left border
    </box>
    <box type="info" color="red" icon=":rocket:">
    
    info, with a custom markdown rocket icon and `red` colored text.
    
    You can use any inline markdown in the `icon` property.
    </box>
    

    OUTPUT:

    default type, styled as an orange box with a brown left border

    info, with a custom markdown rocket icon and red colored text.

    You can use any inline markdown in the icon property.

    You can remove the background, icon and borders of preset styles.

    CODE:

    <box no-icon no-background type="success">
        success box without a tick icon and backgound
    </box>
    
    <box no-border type="definition" light>
        definition type box, light style without border
    </box>
    

    OUTPUT:

    success box without a tick icon and backgound definition type box, light style without border

    Custom styles ( background-color, border-color, border-left-color, icon ) as introduced in the previous section, takes precedence over the no-background, no-border, no-icon attributes.

    You can also use icons, resize them and change their color accordingly.

    CODE:

    <box type="success" icon=":fas-camera:">
        Lorem ipsum dolor sit amet, consectetur adipiscing elit
    </box>
    <box type="warning" icon=":fas-camera:" icon-size="2x">
        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    </box>
    <box type="definition" icon=":fas-camera:" icon-size="3x">
        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
    </box>
    <box type="info" icon=":fas-camera:" icon-color="red" icon-size="3x">
        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
    </box>
    

    OUTPUT:

    Lorem ipsum dolor sit amet, consectetur adipiscing elit Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

    Options

    Name Type Default Description
    background-color String null
    border-color String null
    border-left-color String null Overrides border-color for the left border.
    color String null Color of the text.
    dismissible Boolean false Adds a button to close the box to the top right corner.
    icon[S] String null Inline MarkDown text of the icon displayed on the left.
    icon-size String null Resizes the icon. Supports integer-scaling of the icon dimensions e.g. 2x, 3x, 4x, etc.
    icon-color String null Color of the icon.
    header[S]
    heading
    (deprecated)
    String null Markdown text of the box header.
    type String '' Supports: info, warning, success, important, wrong, tip, definition, or empty for default.
    light Boolean false Uses a light color scheme for the box.
    seamless Boolean false Uses a seamless style for the box. If light is specified, this style will not be activated.
    no-border Boolean false Removes border, except if styled by border-color or border-left-color.
    no-backgound Boolean false Removes background, except if styled by backgound-color option.
    no-icon Boolean false Removes icon, except if icon is displayed via icon option.
    ```html warning ``` default info warning success important wrong tip definition
    Diagrams

    Sequence Diagram:

    Use Case Diagram:

    Class Diagram:

    Activity Diagram:

    Component Diagram:

    State Diagram:

    Object Diagram:

    Gantt Diagram:

    Entity Relation Diagram:

    Ditaa Diagram:

    Archimate Diagram:

    Diagrams

    You can use the PlanUML syntax to add diagrams.

    Java and Graphviz must be installed to use this feature

    • Java 8 or later (required to run the PlantUML JAR executable)
    • Graphviz v2.38 or later (required to generate all diagrams)

    CODE:

    <puml width=300>
    @startuml
    alice -> bob ++ : hello
    bob -> bob ++ : self call
    bob -> bib ++  #005500 : hello
    bob -> george ** : create
    return done
    return rc
    bob -> george !! : delete
    return success
    @enduml
    </puml>
    

    OUTPUT:

    Alternatively, a PlantUML diagram can be specified in a separate .puml file and inserted into a page using a <puml> tag.

    CODE:

    diagrams/sequence.puml:

    @startuml
    alice -> bob ++ : hello
    bob -> bob ++ : self call
    bob -> bib ++  #005500 : hello
    bob -> george ** : create
    return done
    return rc
    bob -> george !! : delete
    return success
    @enduml
    

    in another file:

    <puml src="diagrams/sequence.puml" width=300 />
    

    OUTPUT:

    The full PlantUML syntax reference can be found at plantuml.com/guide

    Sequence Diagram:

    Use Case Diagram:

    Class Diagram:

    Activity Diagram:

    Component Diagram:

    State Diagram:

    Object Diagram:

    Gantt Diagram:

    Entity Relation Diagram:

    Ditaa Diagram:

    Archimate Diagram:

    Options

    Name Type Description
    alt string The alternative text of the diagram.
    height string The height of the diagram in pixels.
    name string The name of the output file.
    src string The URL of the diagram if your diagram is in another .puml file.
    The URL can be specified as absolute or relative references. More info in: Intra-Site Links
    width string The width of the diagram in pixels.
    If both width and height are specified, width takes priority over height. It is to maintain the diagram's aspect ratio.
    <puml width=300>
    @startuml
    alice -> bob ++ : hello
    bob -> bob ++ : self call
    @enduml
    </puml>
    

    Sequence Diagram:

    Use Case Diagram:

    Class Diagram:

    Activity Diagram:

    Component Diagram:

    State Diagram:

    Object Diagram:

    Gantt Diagram:

    Entity Relation Diagram:

    Ditaa Diagram:

    Archimate Diagram:

    Action
  • Action
  • Another action
  • Something else here
  • Separated link
  • ...
  • You can use Dropdowns as a top level component.

    CODE:

    <!--Notice how header attribute supports inline MarkDown-->
    <dropdown header="*Action*" type="primary">
      <li><a href="#dropdown" class="dropdown-item">Action</a></li>
      <li><a href="#dropdown" class="dropdown-item">Another action</a></li>
      <li><a href="#dropdown" class="dropdown-item">Something else here</a></li>
      <li role="separator" class="dropdown-divider"></li>
      <li><a href="#dropdown" class="dropdown-item">Separated link</a></li>
    </dropdown>
    
    <!-- For segmented dropdown, ignore header and add a "before" slot -->
    <dropdown type="info">
      <button slot="before" type="button" class="btn btn-info">Segmented</button>
      <li><a href="#dropdown" class="dropdown-item">...</a></li>
    </dropdown>
    
    <!-- Right aligned list -->
    <dropdown header="Right aligned list" type="primary" menu-align-right>
      <li><a href="#dropdown" class="dropdown-item">Something else here</a></li>
    </dropdown>
    

    OUTPUT:

    You can also use Dropdowns as a nested component (e.g. part of a button group).

    CODE:

    <!-- In a button group -->
    <div class="btn-group d-flex" role="group">
      <a href="#dropdown" class="btn btn-danger w-100" role="button">Left</a>
      <!-- With slots you can handle some elements as native bootstrap -->
      <dropdown class="w-100">
        <button slot="button" type="button" class="btn btn-warning dropdown-toggle w-100">
          Action
          <span class="caret"></span>
        </button>
        <ul slot="dropdown-menu" class="dropdown-menu">
          <li><a href="#dropdown" class="dropdown-item">Action</a></li>
          <li><a href="#dropdown" class="dropdown-item">Another action</a></li>
          <li><a href="#dropdown" class="dropdown-item">Something else here</a></li>
          <li role="separator" class="dropdown-divider"></li>
          <li><a href="#dropdown" class="dropdown-item">Separated link</a></li>
        </ul>
      </dropdown>
      <a href="#dropdown" class="btn btn-success w-100" role="button">Right</a>
    </div>
    

    OUTPUT:

    Options

    Name Type Default Description
    disabled Boolean false Whether Dropdown can be opened.
    menu-align-right Boolean false Whether the dropdown list will be right-aligned.
    header[S]
    text
    (deprecated)
    String '' Dropdown button header text. (Supports inline MarkDown syntax)
    type String default Supports: default, primary, danger, info, warning, success.

    You may refer to this documentation regarding how you can use the Bootstrap buttons, and how to style them.

    <dropdown header="Action" type="primary">
      <li><a href="#dropdown" class="dropdown-item">Action</a></li>
      <li><a href="#dropdown" class="dropdown-item">Another action</a></li>
      <li role="separator" class="dropdown-divider"></li>
      <li><a href="#dropdown" class="dropdown-item">Separated link</a></li>
    </dropdown>
    
    Action
  • Action
  • Another action
  • Something else here
  • Separated link
  • ...
  • Footers

    You can see an example of a footer at the bottom of this page.

    Footers

    You can specify a For an example of a page footer, see the bottom of this page.page footer using a footer file.

    You can save multiple footer files in the _markbind/footers folder and specify it in the <frontmatter> of the pages in which it should appear.

    Example _markbind/footers/commonFooter.md:

    <footer>
      This page is not updated anymore!
    </footer>
    

    In the page that you want to include the footer:

    <frontmatter>
      footer: commonFooter.md
    </frontmatter>
    

    Notes:

    • Any inline footers will be removed by MarkBind to ensure compatibility with footer files.
    • If a Layout is specified, the footer file specified in the <frontmatter> will override the footer within the Layout.
    • If you wish to use a Layout but exclude its footer file, specify footer: none in the <frontmatter> of the page.
    • MarkBind Components and <include> tags are not supported in footers.
    ```html
    This page is not updated anymore!
    ``` ```html footer: commonFooter.md ```

    You can see an example of a footer at the bottom of this page.

    Headers
    Content to be placed at the top of your page.

    Headers

    You can specify a Content to be placed at the top of a page.page header above your page contents and Site Navigation and
    Page Navigation menus
    navigation menus
    using a header file.

    You can save multiple header files in the _markbind/headers folder and specify it in the <frontmatter> of the pages in which it should appear.

    Example _markbind/headers/welcomeBanner.md:

    <header>
      <div class="bg-primary display-4 text-center text-white">
        Welcome!
      </div>
    </header>
    

    In the page that you want to include the header:

    <frontmatter>
      header: welcomeBanner.md
    </frontmatter>
    

    You can fix the header to be always on the top by add fixed attribute to the <header> tag of your header file:

    Example _markbind/headers/header.md:

    <header fixed>
        <!--Normal header stuff goes here-->
    </header>
    
    

    Notes:

    • Any inline headers will be removed by MarkBind to ensure compatibility with header files.
    • If a Layout is specified, the header file specified in the <frontmatter> will override the header within the Layout.
    • If you wish to use a Layout but exclude its header file, specify header: none in the <frontmatter> of the page.
    • MarkBind Components and <include> tags are not supported in headers.
    ```html
    Welcome!
    ``` ```html header: welcomeBanner.md ```
    Content to be placed at the top of your page.
    Modals

    Hover here to open a modal. Modal content

    Modals

    Modals are to be used together with the Trigger component for activation.

    CODE:

    More about <trigger for="modal:loremipsum">trigger</trigger>.
    <modal header="**Modal header** :rocket:" id="modal:loremipsum">
      Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
      magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
      consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
      Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    </modal>
    <br>
    This is the same <trigger for="modal:loremipsum">trigger</trigger> as last one.
    
    <trigger for="modal:centered">This is a trigger for a centered modal</trigger>.
    
    <modal header="**Centered** :rocket:" id="modal:centered" center>
      Centered
    </modal>
    
    <trigger for="modal:ok-text">This is a trigger for a modal with a custom OK button</trigger>.
    
    <modal header="OK button visible!" id="modal:ok-text" ok-text="Custom OK">
      Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
      magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
      consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
      Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    </modal>
    

    OUTPUT:

    More about trigger. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    This is the same trigger as last one.

    This is a trigger for a centered modal.

    Centered

    This is a trigger for a modal with a custom OK button.

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    Triggers

    Trigger provides more flexibility in triggering contextual overlay via Tooltip, Popover or Modal.

    You could embed a Trigger within the text, and define the Tooltip, Popover or Modal at a separate location, which allows for a cleaner authoring flow.

    Specify the id attribute on the Tooltip, Popover or Modal component, and use the same id in the for attribute of the Trigger to allow the Trigger to invoke the specific overlay elements. Additionally, multiple Triggers could share the same overlay by providing them with the same id.

    Trigger's trigger attribute (which defaults to hover) is independent of the target's.

    Options

    Name Type Default Description
    trigger String hover How the overlay view is triggered.
    Supports: click, focus, hover.
    for String null The id for the overlay view to be shown.
    placement String auto How to position the Popover or Tooltip.
    Supports: auto, top, left, right, bottom.

    Options

    Name type Default Description
    header[S]
    title
    (deprecated)
    String '' Header of the Modal component. Supports inline markdown text.
    footer
    modal-footer
    (deprecated)
    Slot empty Specifying this will override the ok-text attribute, and the OK button will not render.
    ok-text String '' Text for the OK button.
    effect String zoom Supports: zoom, fade.
    id String Used by Trigger to activate the Modal by id.large
    small Boolean false Creates a small Modal.
    large Boolean false Creates a large Modal.
    center Boolean false Vertically centers the modal (in addition to the horizontal centering by default).
    backdrop Boolean true Enables closing the Modal by clicking on the backdrop.
    Click <trigger trigger="click" for="modal:unused">here</trigger> to open a modal.
    <modal header="Modal header" id="modal:unused">
        Modal content
    </modal>
    

    Hover here to open a modal. Modal content

    MarkBind
  • Highlighted Link
  • Option
  • Fork...
  • MarkBind
  • Highlighted Link
  • Option
  • Fork...
  • MarkBind
  • Highlighted Link
  • Option
  • Fork...
  • Navbar allows visitors of your website to navigate through pages easily.

    Navbars support link highlighting; link highlighting can be customised by specifying rules.

    • Define default-highlight-on in <navbar> to specify fallback highlight rules.
    • Define data-highlight in <a> tags with the class nav-link or dropdown-item to specify individual highlight rules.

    Note: Navbars should be placed within a header file to ensure that they are correctly positioned at the top of the page, above the site navigation and page navigation menus.

    CODE:

    <navbar type="primary">
      <!-- Brand as slot -->
      <a slot="brand" href="/" title="Home" class="navbar-brand">MarkBind</a>
      <li><a href="/userGuide/usingComponents.html#navbars" class="nav-link">Highlighted Link</a></li>
      <!-- You can use dropdown component -->
      <dropdown header="Dropdown" class="nav-link">
        <li><a href="#navbar" class="dropdown-item">Option</a></li>
      </dropdown>
      <!-- For right positioning use slot -->
      <li slot="right">
        <a href="https://github.com/MarkBind/markbind" target="_blank" class="nav-link">Fork...</a>
      </li>
    </navbar>
    
    <navbar type="dark">
      <!-- Brand as slot -->
      <a slot="brand" href="/" title="Home" class="navbar-brand">MarkBind</a>
      <li><a href="/userGuide/usingComponents.html#navbars" class="nav-link">Highlighted Link</a></li>
      <!-- You can use dropdown component -->
      <dropdown header="Dropdown" class="nav-link">
        <li><a href="#navbar" class="dropdown-item">Option</a></li>
      </dropdown>
      <!-- For right positioning use slot -->
      <li slot="right">
        <a href="https://github.com/MarkBind/markbind" target="_blank" class="nav-link">Fork...</a>
      </li>
    </navbar>
    
    <navbar type="light">
      <!-- Brand as slot -->
      <a slot="brand" href="/" title="Home" class="navbar-brand">MarkBind</a>
      <li><a href="/userGuide/usingComponents.html#navbars" class="nav-link">Highlighted Link</a></li>
      <!-- You can use dropdown component -->
      <dropdown header="Dropdown" class="nav-link">
        <li><a href="#navbar" class="dropdown-item">Option</a></li>
      </dropdown>
      <!-- For right positioning use slot -->
      <li slot="right">
        <a href="https://github.com/MarkBind/markbind" target="_blank" class="nav-link">Fork...</a>
      </li>
    </navbar>
    

    OUTPUT:

    Options

    Name Type Default Description
    type String primary Supports: primary, dark, light, none.
    default-highlight-on String sibling-or-child Supports: sibling-or-child, sibling, child, exact, none. Specifies link highlight rules for navbars.

    If you wish to further customize your navbar beyond the primary, dark, and light theme colors, specify the type="none" attribute and insert your own custom styles or use built-in background styles via the add-class attribute.

    For instance, Bootstrap supports .bg-danger, bg-info, bg-primary, bg-success, bg-warning as background colors. In {your-site}/_markbind/headers/header.md, you can change <navbar type="dark/primary/light"> to <navbar type="none" add-class="bg-warning/danger/info/primary/success"> to apply Bootstrap background styles.

    Navbar Link Highlighting

    <header fixed>
      <link rel="stylesheet" href="/css/main.css">
      <navbar type="dark">
        <a slot="brand" href="/index.html" title="Home" class="navbar-brand"><img src="/images/logo-darkbackground.png" height="20"></a>
        <li><a highlight-on="exact" href="/index.html" class="nav-link">HOME</a></li>
        <div tags="environment--ug"><li><a highlight-on="sibling-or-child" href="/userGuide/index.html" class="nav-link">USER GUIDE</a></li></div>
        <div tags="environment--dg"><li><a highlight-on="sibling-or-child" href="/devGuide/index.html" class="nav-link">DEVELOPER GUIDE</a></li></div>
        <li><a highlight-on="exact" href="/showcase.html" class="nav-link">SHOWCASE</a></li>
        <li><a highlight-on="exact" href="/about.html" class="nav-link">ABOUT</a></li>
        <li>
          <a href="https://github.com/MarkBind/markbind" target="_blank" class="nav-link"><md>:fab-github:</md></a>
        </li>
        <li slot="right">
          <form class="navbar-form">
            <searchbar :data="searchData" placeholder="Search" :on-hit="searchCallback" menu-align-right></searchbar>
          </form>
        </li>
      </navbar>
    </header>
    
    

    Highlight Options

    Name Description
    child Highlights link if URL in address bar is a child of the link. E.g foo/bar is a child of foo.
    sibling Highlights link if URL in address bar is a sibling of the link. E.g foo/bar and foo/bear are siblings.
    sibling-or-child Highlights link if URL in address bar is a sibling or child of the link.
    exact Highlights link if URL in address bar exactly matches link.
    none No highlighting.
    <navbar type="primary">
      <!-- Brand as slot -->
      <a slot="brand" href="/" title="Home" class="navbar-brand">MarkBind</a>
      <li><a href="/userGuide/usingComponents.html#navbars" class="nav-link">Highlighted Link</a></li>
      <!-- You can use dropdown component -->
      <dropdown header="Dropdown" class="nav-link">
        <li><a href="#navbar" class="dropdown-item">Option</a></li>
      </dropdown>
      <!-- For right positioning use slot -->
      <li slot="right">
        <a href="https://github.com/MarkBind/markbind" target="_blank" class="nav-link">Fork...</a>
      </li>
    </navbar>
    
    MarkBind
  • Highlighted Link
  • Option
  • Fork...
  • MarkBind
  • Highlighted Link
  • Option
  • Fork...
  • MarkBind
  • Highlighted Link
  • Option
  • Fork...
  • You can see an example of a Page Navigation Bar on the right side of this page.

    A Page Navigation Menu (pageNav for short) is a fixed menu on the right edge of your page contents. You can use a pageNav to show a list of the current page's headings.

    Steps to add a pageNav:

    1. Specify your pageNav within the <frontmatter> of a page with The value default will use headingIndexingLevel within site.json."default" or a HTML defines six levels of headings, numbered from
      1 to 6.
      heading level
      .
    2. (Optional) You may also specify a page navigation title within <frontmatter> that will be placed at the top of the page navigation menu.

    Example In the page that you want to have page navigation:

    <frontmatter>
      pageNav: 2
      pageNavTitle: "Chapters of This Page"
    </frontmatter>
    

    The example above will create a page navigation containing only heading levels of 1 and 2.

    A pageNav has a fixed width of 300 pixels for its contents. It is responsive by design and will be completely hidden when the screen size is smaller than 1300 pixels.

    <frontmatter>
      pageNav: 2
      pageNavTitle: "Chapters of This Page"
    </frontmatter>
    

    You can see an example of a Page Navigation Bar on the right side of this page.

    Panels
    ... ... ... ... ... ...

    ... ... ... ...

    Panels

    Panel is a flexible container that supports collapsing and expanding its content. It is expandable by default.

    CODE:

    <panel header="This is your header for a Panel, click me to expand!">
      Lorem ipsum ...
    </panel>
    

    OUTPUT:

    Lorem ipsum ...

    With minimized attribute, panel is minimized into an inline block element. The alt attribute is for you to specify the minimized block header.

    CODE:

    <panel header="How to cultivate a tomato plant at home" alt="Tomatoes" minimized>
      Lorem ipsum ...
    </panel>
    

    OUTPUT:

    Lorem ipsum ...

    With expanded attribute, you can set the panels to be expanded when loaded in.

    CODE:

    <panel header="Have your readers click less to see the Panel's contents" expanded>
      Lorem ipsum ...
    </panel>
    

    OUTPUT:

    Lorem ipsum ...

    Panel provides many types that change its appearance.

    CODE:

    <panel header="**light type panel (DEFAULT)**" type="light" minimized>
      ...
    </panel>
    <panel header="**dark type panel**" type="dark" minimized>
      ...
    </panel>
    <panel header="**primary type panel**" type="primary" minimized>
      ...
    </panel>
    <panel header="**secondary type panel**" type="secondary" minimized>
      ...
    </panel>
    <panel header="**info type panel**" type="info" minimized>
      ...
    </panel>
    <panel header="**danger type panel**" type="danger" minimized>
      ...
    </panel>
    <panel header="**warning type panel**" type="warning" minimized>
      ...
    </panel>
    <panel header="**success type panel**" type="success" minimized>
      ...
    </panel>
    <panel header="**seamless type panel**" type="seamless" minimized>
      ...
    </panel>
    <panel header="**minimal type panel**" type="minimal" minimized>
      ...
    </panel>
    

    OUTPUT:

    ... ... ... ... ... ... ... ... ... ...

    Show/Hide buttons using no-switch or no-close.

    CODE:

    <panel header="This panel does not have a switch button" no-switch>
      ...
    </panel>
    <panel header="This panel does not have a close button" no-close>
      ...
    </panel>
    <panel header="This panel does not have either buttons" no-close no-switch>
      ...
    </panel>
    

    OUTPUT:

    ... ... ...

    Use markdown in the header (only inline level markdown are supported).

    CODE:

    <panel header="**Bold text** :rocket: ![](https://markbind.org/images/logo-lightbackground.png =x20)" type="seamless">
      ...
    </panel>
    

    OUTPUT:

    ...

    If src attribute is provided, the panel will take content from the src specified and add it to the Panel body.

    CODE:

    <panel header="Content loaded in from 'src'" src="extra/loadContent.html#fragment" minimized></panel>
    

    OUTPUT:

    If popup-url attribute is provided, a popup button will be shown. If clicked, it opens the specified url in a new window.

    CODE:

    <panel header="Try clicking on my pop-up button" popup-url="/userGuide/syntax/extra/loadContent.html">
      This panel has a popup.
    </panel>
    

    OUTPUT:

    This panel has a popup.

    If preload attribute is provided, the panel body will load the HTML when the page renders instead of after being expanded.

    CODE:

    <panel header="Right click and inspect my HTML before expanding me!" src="extra/loadContent.html#fragment" preload>
      <p>You should be able to find this text before expanding the Panel.</p>
    </panel>
    

    OUTPUT:

    You should be able to find this text before expanding the Panel.

    You can nest Panels or other components within a Panel.

    CODE:

    <panel header="Parent Panel">
      <panel header="Level 1 Nested Panel">
        <panel header="Level 2 Nested Panel">
          <tip-box type="success">
            I'm a nested tip-box
          </tip-box>
          <panel header="Level 3 Nested Panel" type="minimal">
            minimal-type panel
          </panel>
        </panel>
      </panel>
      <panel header="Level 1 Nested Panel" type="info">
        Some Text
      </panel>
    </panel>
    

    OUTPUT:

    I'm a nested tip-box minimal-type panel Some Text

    Options

    Name Type Default Description
    header[S] String '' The clickable text on the Panel's header. Supports MarkDown text.
    alt String Panel header The clickable text on the minimised Panel. Supports MarkDown text.
    expandable Boolean true Whether Panel is expandable.
    expanded Boolean false Whether Panel is expanded or collapsed when loaded in.
    minimized Boolean false Whether Panel is minimized.
    no-close Boolean false Whether to show the close button.
    no-switch Boolean false Whether to show the expand switch.
    bottom-switch Boolean true Whether to show an expand switch at the bottom of the panel. Independent of no-switch.
    popup-url String The url that the popup window will navigate to. The url can be absolute or relative.
    preload Boolean false Whether the content is loaded immediately from src.
    src String The url to the remote page to be loaded as the content of the panel.
    type String light The type or color scheme of the panel (single).
    Supports: light, dark, primary, secondary, info, success, warning, danger, seamless, minimal.
    <panel header="primary type panel" type="primary" >
      ...
    </panel>
    
    ... ... ... ... ... ...

    ... ... ... ...
    Pictures
    MarkBind Logo

    Pictures

    A pic component allows you to add captions below the image.

    CODE:

    <pic src="https://markbind.org/images/logo-lightbackground.png" width="300" alt="Logo">
      MarkBind Logo
    </pic>
    

    OUTPUT:

    MarkBind Logo

    Options

    Name Type Default Description
    alt string This must be specified.
    The alternative text of the image.
    height string The height of the image in pixels.
    src string This must be specified.
    The URL of the image.
    The URL can be specified as absolute or relative references. More info in: Intra-Site Links
    width string The width of the image in pixels.
    If both width and height are specified, width takes priority over height. It is to maintain the image's aspect ratio.
    <pic src="https://markbind.org/images/logo-lightbackground.png" width="300" alt="Logo">
      MarkBind Logo
    </pic>
    
    MarkBind Logo
    Popovers

    Hover over the keyword to see the popover.

    Popover header

    description πŸ‘

    Popovers

    CODE:

    <popover effect="fade" content="Lorem ipsum dolor sit amet" placement="top">
      <button class="btn btn-secondary">Popover on top</button>
    </popover>
    <popover effect="fade" content="Lorem ipsum dolor sit amet" placement="left">
      <button class="btn btn-secondary">Popover on left</button>
    </popover>
    <popover effect="fade" content="Lorem ipsum dolor sit amet" placement="right">
      <button class="btn btn-secondary">Popover on right</button>
    </popover>
    <popover effect="fade" content="Lorem ipsum dolor sit amet" placement="bottom">
      <button class="btn btn-secondary">Popover on bottom</button>
    </popover>
    <hr>
    <h4 class="no-index">Header</h4>
    <popover effect="fade" header="Header" content="Lorem ipsum dolor sit amet" placement="top">
      <button class="btn btn-secondary">Popover on top</button>
    </popover>
    <popover effect="fade" header="Header" content="Lorem ipsum dolor sit amet" placement="left">
      <button class="btn btn-secondary">Popover on left</button>
    </popover>
    <popover effect="fade" header="Header" content="Lorem ipsum dolor sit amet" placement="right">
      <button class="btn btn-secondary">Popover on right</button>
    </popover>
    <popover effect="fade" header="Header" content="Lorem ipsum dolor sit amet" placement="bottom">
      <button class="btn btn-secondary">Popover on bottom</button>
    </popover>
    <hr />
    <h4 class="no-index">Trigger</h4>
    <p>
      <popover effect="scale" header="Header" content="Lorem ipsum dolor sit amet" placement="top" trigger="hover">
        <button class="btn btn-secondary">Mouseenter</button>
      </popover>
    </p>
    <h4 class="no-index">Markdown</h4>
    <p>
      <popover effect="scale" header="**Emoji header** :rocket:" content="!!emoji!! content :cat:">
        <button class="btn btn-secondary">Hover</button>
      </popover>
    </p>
    <h4 class="no-index">Content using slot</h4>
    <popover effect="scale" header="**Emoji header** :rocket:">
      <div slot="content">
        This is a long content...
      </div>
      <button class="btn btn-secondary">Hover</button>
    </popover>
    <br />
    <br />
    <h4 class="no-index">Wrap Text</h4>
    <popover header="false" content="Nice!">What do you say</popover>
    

    OUTPUT:

    Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet

    Header

    HeaderLorem ipsum dolor sit amet HeaderLorem ipsum dolor sit amet HeaderLorem ipsum dolor sit amet HeaderLorem ipsum dolor sit amet

    Trigger

    HeaderLorem ipsum dolor sit amet

    Markdown

    Emoji header πŸš€emoji content 🐱

    Content using slot

    Emoji header πŸš€
    This is a long content...


    Wrap Text

    falseNice!What do you say

    Using trigger for Popover:

    CODE:

    More about <trigger for="pop:trigger_id">trigger</trigger>.
    <popover id="pop:trigger_id" content="This popover is triggered by a trigger"></popover>
    <br>
    This is the same <trigger for="pop:trigger_id">trigger</trigger> as last one.
    

    OUTPUT:

    More about trigger. This popover is triggered by a trigger
    This is the same trigger as last one.

    Triggers

    Trigger provides more flexibility in triggering contextual overlay via Tooltip, Popover or Modal.

    You could embed a Trigger within the text, and define the Tooltip, Popover or Modal at a separate location, which allows for a cleaner authoring flow.

    Specify the id attribute on the Tooltip, Popover or Modal component, and use the same id in the for attribute of the Trigger to allow the Trigger to invoke the specific overlay elements. Additionally, multiple Triggers could share the same overlay by providing them with the same id.

    Trigger's trigger attribute (which defaults to hover) is independent of the target's.

    Options

    Name Type Default Description
    trigger String hover How the overlay view is triggered.
    Supports: click, focus, hover.
    for String null The id for the overlay view to be shown.
    placement String auto How to position the Popover or Tooltip.
    Supports: auto, top, left, right, bottom.

    Options

    Name Type Default Description
    trigger String hover How the Popover is triggered.
    Supports: click, focus, hover.
    header
    title
    (deprecated)
    String '' Popover header, supports inline markdown text.
    content String '' Popover content, supports inline markdown text.
    placement String top How to position the Popover.
    Supports: top, left, right, bottom.
    Hover over the <trigger for="pop:context-target">keyword</trigger> to see the popover.
    
    <popover id="pop:context-target" header="Popover header" placement="top">
    <div slot="content">
    
    description :+1:
    
    </div>
    </popover>
    

    Hover over the keyword to see the popover.

    Popover header

    description πŸ‘

    Questions and Quizzes
    Each valid test input should appear at least once in a test case that doesn’t have any invalid inputs. It is ok to combine valid values for different inputs. No more than one invalid test input should be in a given test case. All invalid test inputs must be tested together.
    If you test all invalid test inputs together, you will not know if each one of the invalid inputs are handled correctly by the SUT. This is because most SUTs return an error message upon encountering the first invalid input.
    How do you figure out which inputs are wrong? (or correct)
    Which of the following is true?

    1 + 1 = 11 1 / 0 = infinity 11 / 11 = 1

    Watch some pizza commercials! πŸ“Ί

    πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ•

    Questions and Quizzes

    Question and quiz components provide an easy way to test readers on the relevant content topic in the page.

    Introduction

    Question components (<question>) can be one of the following types: MCQ, Checkbox or Text.

    In all cases, content directly inserted in between <question>...</question> will be inserted into the question body.

    You can also insert markdown into the header or hint box, by using the header and hint attributes respectively. Click the hint button below to see how the hint box turns out!

    CODE:

    Header and Hint syntax
    <!-- Insert markdown into the header and hint using the respective attributes -->
    <question type="checkbox" header="Which of the following is correct?" hint="Think out of the box! :fas-box:">
    
      <!-- Anything you place directly under a question not in a slot is inserted into the question body! -->
      <small>Adapted from [Daily Mail](https://www.dailymail.co.uk/femail/article-4702868/Can-pass-intelligence-test.html)
      </small>
      </pic>
    
      <!-- Several hidden checkbox q-option components explained later -->
    </question>
    

    OUTPUT:

    Adapted from Daily Mail

    96 19 40 811

    If you require more expressive formatting for your header or hint markup, you can use the <div slot="header"> and <div slot="hint"> slots. Expand the panel below to see an example!

    CODE:

    Headers and Hints using slots
    <question type="checkbox" header="Which of the following is true?" hint="Think out of the box! :fas-box:">
      <!-- Header slot -->
      <div slot="header">
    
      Which of the following is correct?
    
      Challenge: Try to get all the answers on your first try! :star: :star:
      </div>
    
      <pic src="/images/math-question.jpg" alt="math question image" height="200" class="d-block mx-auto">
    
      <small>Adapted from [Daily Mail](https://www.dailymail.co.uk/femail/article-4702868/Can-pass-intelligence-test.html)
      </small>
      </pic>
    
      <!-- Several hidden checkbox q-option components explained later -->
    
      <!-- Hint slot -->
      <div slot="hint">
    
      Think out of the box! :fas-box:
    
      Need another hint? <tooltip content="Two of the answers are correct!">Hover over me!</tooltip> :fas-mouse-pointer:
      </div>
    </question>
    

    OUTPUT:

    Which of the following is correct?

    Challenge: Try to get all the answers on your first try! ⭐️ ⭐️

    Adapted from Daily Mail

    96 19 40 811

    Think out of the box!

    Need another hint? Two of the answers are correct!Hover over me!

    Placing the question into the header is entirely optional. You may also wish to include the question directly in the question body, omitting the header entirely.

    Options and Slots common to all question types

    Name Type Default Description
    type String '' The type of question. Supports mcq, checkbox or text.
    header[S] String '' The markup to insert into the question header. The header is omitted if this is not provided.
    hint[S] String '' The content to display in the hint box.

    MCQ and Checkbox Questions

    MCQ and checkbox questions are indicated with the type="mcq" or type="checkbox" attribute.

    In both instances, you can include the possible answers using the <q-option> component, placed anywhere inside the if you wish, you could place it in the header mentioned above as well!question. To indicate the correct option(s), add the <q-option correct> attribute.

    Optionally, you can provide the reason for the particular option using the <q-option reason="..."> attribute, or the <div slot="reason"> slot for more expressive formatting, similar to the hint and header options and slots.

    MCQ Questions

    CODE:

    <question type="mcq" header="Which of these **contradicts** the heuristics recommended when creating test cases with multiple inputs?">
      <!-- Insert the reason for the option using the reason attribute -->
      <q-option reason="This is **correct**. We need to figure out if a positive test case works!">
        Each valid test input should appear at least once in a test case that doesn’t have any invalid inputs.
      </q-option>
      <q-option>
        It is ok to combine valid values for different inputs.
      </q-option>
      <q-option>
        No more than one invalid test input should be in a given test case.
      </q-option>
      <!-- Use the 'correct' attribute to indicate an option as correct. -->
      <q-option correct>
        All invalid test inputs must be tested together.
        <!-- Optionally, you may use a reason slot instead of a reason attribute. -->
        <div slot="reason">
        If you test all invalid test inputs together, you will not know if each one of the invalid inputs are handled
        correctly by the SUT.
        This is because most SUTs return an error message upon encountering the first invalid input.
        </div>
      </q-option>
      <div slot="hint">
      How do you figure out which inputs are wrong? (or correct)
      </div>
    </question>
    

    OUTPUT:

    Each valid test input should appear at least once in a test case that doesn’t have any invalid inputs. It is ok to combine valid values for different inputs. No more than one invalid test input should be in a given test case. All invalid test inputs must be tested together.
    If you test all invalid test inputs together, you will not know if each one of the invalid inputs are handled correctly by the SUT. This is because most SUTs return an error message upon encountering the first invalid input.
    How do you figure out which inputs are wrong? (or correct)

    MCQ questions can have multiple correct options!

    Checkbox Questions

    CODE:

    <question type="checkbox" hint="Use your calculator! :fas-calculator:">
    
      ##### Which of the following is true?
    
      <br>
      <q-option reason="lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum">
        1 + 1 = 11
      </q-option>
      <q-option reason="Division by zero is **undefined**!">
        1 / 0 = infinity
      </q-option>
      <q-option correct>
      11 / 11 = 1
      </q-option>
    </question>
    

    OUTPUT:

    Which of the following is true?

    1 + 1 = 11 1 / 0 = infinity 11 / 11 = 1

    q-option Options and Slots

    Name Type Default Description
    correct Boolean false Whether this option (placed under either a MCQ or checkbox question) is correct. You may have multiple correct answers in either case.
    reason[S] String '' The explanation markup to display for the option once the answer is checked.

    Text Questions

    Text questions are specified with the type="text" attribute.

    Unlike MCQ and checkbox questions, answer checking is performed by providing keywords to check for in the user's answer through the keywords attribute. If no keywords are provided, the answer will always be marked as correct when placed in quizzes.

    Keywords are validated by simply looking for the keyword as a pattern in the user's answer! This works well for some When does validation work?cases

    When the keywords specified are rather long (eg. `requirements`), it reduces the chance that this keyword can be mistakenly validated.

    In contrast, something short and common like `take` which can easily be part of another word (eg. `mis-take-nly`) would be mistakenly validated.
    and not others.

    You can provide your answer in the answer attribute, or similarly, the <div slot="answer"> slot for more expressive formatting.

    CODE:

    <question type="text" header="Which country did the Hawaiian pizza originate from?"
              keywords="hawaii" threshold="0.5" answer="It originated from Hawaii!">
      <div slot="hint">
    
      Watch some pizza commercials! :tv:
    
      :pizza: :pizza: :pizza: :pizza: :pizza: :pizza: :pizza: :pizza: :pizza: :pizza: :pizza: :pizza:
      </div>
    </question>
    

    OUTPUT:

    Watch some pizza commercials! πŸ“Ί

    πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ•

    Since the validation is imperfect, the minimum proportion of keywords that need to be matched can also be changed using the threshold attribute.

    If you don't want to validate the answer at all, you may also omit the keywords attribute entirely. Doing so also always marks the question as correct inside quizzes.

    Text Question specific Options and Slots

    Name Type Default Description
    keywords String '' Comma delimited string of keywords or phrases to match the user's answer against.
    threshold Number 0.5 Minimum proportion of keywords that have to be matched in the user's answer for the answer to be marked as correct.
    answer[S] String '' The answer or explanation to display when the user clicks the check button.
    • The old has-input attributes translate to type="text", but will be deprecated in a future version.
    • <question>s without a type (or an unrecognised one) will always be marked correct when placed in quizzes.

    Quizzes

    You can also build a series of questions out of multiple <question> components.

    Simply place the <question> components you want to include into the <quiz> component! No extra configuration is needed.

    CODE:

    <quiz>
      <question type="mcq">...</question>
      <question type="checkbox">...</question>
      <question type="text">...</question>
    </quiz>
    

    OUTPUT:

    Each valid test input should appear at least once in a test case that doesn’t have any invalid inputs. It is ok to combine valid values for different inputs. No more than one invalid test input should be in a given test case. All invalid test inputs must be tested together.
    If you test all invalid test inputs together, you will not know if each one of the invalid inputs are handled correctly by the SUT. This is because most SUTs return an error message upon encountering the first invalid input.
    How do you figure out which inputs are wrong? (or correct)
    Which of the following is true?

    1 + 1 = 11 1 / 0 = infinity 11 / 11 = 1

    Watch some pizza commercials! πŸ“Ί

    πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ•


    Quiz Options and Slots

    Name Type Default Description
    intro String '' Quiz intro markup above the question count.
    intro Slot Click start to begin Quiz intro markup. Overrides the intro attribute if both are present.
    MCQ and Checkbox questions
    <!-- use type="checkbox" for checkbox questions -->
    <question type="mcq" header="Which of these **contradicts** the heuristics recommended when creating test cases with multiple inputs?">
      <!-- Insert the reason for the option using the reason attribute -->
      <q-option reason="This is **correct**. We need to figure out if a positive test case works!">
        Each valid test input should appear at least once in a test case that doesn’t have any invalid inputs.
      </q-option>
      <q-option>
        It is ok to combine valid values for different inputs.
      </q-option>
      <q-option>
        No more than one invalid test input should be in a given test case.
      </q-option>
      <!-- Use the 'correct' attribute to indicate an option as correct. -->
      <q-option correct>
        All invalid test inputs must be tested together.
        <!-- Optionally, you may use a reason slot instead of a reason attribute. -->
        <div slot="reason">
        If you test all invalid test inputs together, you will not know if each one of the invalid inputs are handled
        correctly by the SUT.
        This is because most SUTs return an error message upon encountering the first invalid input.
        </div>
      </q-option>
      <div slot="hint">
      How do you figure out which inputs are wrong? (or correct)
      </div>
    </question>
    
    Text questions
    <question type="text" header="Which country did the Hawaiian pizza originate from?"
              keywords="hawaii" threshold="0.5" answer="It originated from Hawaii!">
      <div slot="hint">
    
      Watch some pizza commercials! :tv:
    
      :pizza: :pizza: :pizza: :pizza: :pizza: :pizza: :pizza: :pizza: :pizza: :pizza: :pizza: :pizza:
      </div>
    </question>
    
    Quiz
    <quiz>
      <question type="mcq">...</question>
      <question type="checkbox">...</question>
      <question type="text">...</question>
    </quiz>
    
    Each valid test input should appear at least once in a test case that doesn’t have any invalid inputs. It is ok to combine valid values for different inputs. No more than one invalid test input should be in a given test case. All invalid test inputs must be tested together.
    If you test all invalid test inputs together, you will not know if each one of the invalid inputs are handled correctly by the SUT. This is because most SUTs return an error message upon encountering the first invalid input.
    How do you figure out which inputs are wrong? (or correct)
    Which of the following is true?

    1 + 1 = 11 1 / 0 = infinity 11 / 11 = 1

    Watch some pizza commercials! πŸ“Ί

    πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ• πŸ•

    Search Bars

    Search Bars

    The searchbar component allows users to search all headings within any page on the site.

    CODE:

    <searchbar :data="searchData" placeholder="Search" :on-hit="searchCallback"></searchbar>
    <searchbar :data="searchData" placeholder="Search (Right-aligned dropdown)" :on-hit="searchCallback" menu-align-right></searchbar>
    

    To use the searchbar within a navbar, add the following markup to your file. The searchbar can be positioned using the slot attribute for the list. The following markup adds a searchbar to the right side of the navbar with appropriate styling.

    <li slot="right">
      <form class="navbar-form">
        <searchbar :data="searchData" placeholder="Search" :on-hit="searchCallback"></searchbar>
      </form>
    </li>
    

    OUTPUT:

    Enter a search term (eg. 'search bar') to see the search result dropdown.

    Options

    Name Type Default Description
    algolia Boolean false Whether the searchbar should be connected to Algolia DocSearch.
    data Array The local data source for suggestions. Expected to be a primitive array. To use MarkBind's search functionality, set this value to "searchData".
    menu-align-right Boolean false Whether the search bar's dropdown list will be right-aligned.
    on-hit Function A callback function when you click or hit return on an item. To use MarkBind's search functionality, set this value to "searchCallback".
    placeholder String '' The placeholder text shown when no keywords are entered in the search bar.

    Note: If you are using MarkBind's search functionality, then enableSearch must be set to true in site.json.

    See: User Guide: Site Configuration β†’ enableSearch.

    Related topic: User Guide: Making the Site Searchable.

    Related topic: User Guide: Using Plugins β†’ Algolia: Enabling Algolia DocSearch.

    <searchbar :data="searchData" placeholder="Search" :on-hit="searchCallback" menu-align-right></searchbar>
    
    <li slot="right">
      <form class="navbar-form">
        <searchbar :data="searchData" placeholder="Search" :on-hit="searchCallback"></searchbar>
      </form>
    </li>
    

    You can see an example of a Page Navigation Bar on the left side of this page.

    A Site Navigation Menu (siteNav for short) is a fixed menu on the left edge of a page, that can be used to show a road map of the main pages of your site.

    Steps to add a siteNav:

    1. Format your siteNav as an unordered Markdown list and save it inside the _markbind/navigation directory.
    2. Specify the file as the value of the siteNav attribute in the <frontmatter> of the page.

    Example Here is an example siteNav code saved in _markbind/navigation/mySiteNav.md file:

    * [:house: Home](/index.html)
    * ---
    * Docs
      * [User Guide](/ug.html)
      * [Dev Guide](/dg.html)
    * [Search](/search.html)
      * [Google Search](https://www.google.com/)
      * [YouTube Search](https://www.youtube.com/)
    * [Contact](/contact.html)
    

    Here's how another page can make use of the above siteNav:

    <frontmatter>
      siteNav: mySiteNav.md
    </frontmatter>
    ...
    

    And here's how the above siteNav would appear:

    MarkBind has styles nested lists with additional padding and smaller text sizes up to 4 nesting levels. Beyond that, you'd have to include your own styles!

    More than one siteNav file can be in _markbind/navigation/ directory but a page may not have more than one siteNav.

    A siteNav has a fixed width of 300 pixels for its contents. A siteNav is responsive in that it will collapse to a menu button when the screen width is smaller than 992 pixels. It will then be completely hidden when the screen size is smaller than 576 pixels.

    If you wish to use a Layout but exclude its navigation file, specify siteNav: none in the <frontmatter> of the page.

    Expanding menu items by default

    You can append the :expanded: to a a menu item with sub menu-itemsparent menu item to make it expand by default. In the example above, * Docs :expanded: will make the menu item Docs expand by default.

    A parent menu item that is also linked will not be collapsible e.g., the Search menu item in the above example.

    Additional content in site navs

    You may have additional HTML and Markdown content in a the file containing the code for a site navigation menu, e.g., mySiteNav.md in the example abovesiteNav file, in which case the code for the siteNav should be enclosed in a <navigation> tag. There should only be one <navigation> tag in the file.

    Example To include a heading for the site nav,

    # Site Map
    
    <navigation>
    * [:house: Home](/index.html)
    * ---
    * Docs
    ...
    </navigation>
    

    You can also include additional content between navigation items, such as horizontal dividers. Just be sure to include it as a list item as well!

    Example Inserting a horizontal divider:

    * [:house: Home](/index.html)
    * ---
    * Docs
    ...
    
    # Site Map
    <navigation>
    * [:house: Home](/index.html)
    * Docs :expanded:
      * [User Guide](/ug.html)
      * [Dev Guide](/dg.html)
    * [Search](/search.html)
    </navigation>
    
    <frontmatter>
      siteNav: mySiteNav.md
    </frontmatter>
    ...
    

    You can see an example of a Page Navigation Bar on the left side of this page.

    Tabs
    Content of the first tab Contents of the second tab Some stuff about stars ... Some stuff about the moon ...

    Tabs

    CODE:

    <tabs>
      <tab header="First tab">
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ullamcorper ultrices lobortis.
      </tab>
      <tab header="Disabled second tab :x:" disabled>
      </tab>
      <tab-group header="Third tab group :milky_way:">
        <tab header="Stars :star:">
          Some stuff about stars ...
        </tab>
        <tab header="Disabled Moon :new_moon:" disabled>
        </tab>
      </tab-group>
      <tab-group header="Disabled fourth tab group" disabled>
        <tab header="Hidden tab">
          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ullamcorper ultrices lobortis.
        </tab>
      </tab-group>
    </tabs>
    

    OUTPUT:

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ullamcorper ultrices lobortis. Some stuff about stars ... Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ullamcorper ultrices lobortis.

    Options

    tabs:

    Name Type Default Description
    active Number 0 Active Tab index (0-based)

    tab:

    Name Type Default Description
    header String null Tab title.
    disabled Boolean false Whether Tab is clickable and can be activated.

    tab-group:

    Name Type Default Description
    header String null Tab Group title.
    disabled Boolean false Whether Tab Group is clickable and can be activated.
    <tabs>
      <tab header="First tab">
        Content of the first tab
      </tab>
      <tab header="Second tab">
        Contents of the second tab
      </tab>
      <tab-group header="Third tab group :tv:">
        <tab header="Stars :star:">
          Some stuff about stars ...
        </tab>
        <tab header="Moon">
          Some stuff about the moon ...
        </tab>
      </tab-group>
    </tabs>
    
    Content of the first tab Contents of the second tab Some stuff about stars ... Some stuff about the moon ...
    Thumbnails

    Thumbnails

    A thumbnail component allows you to insert thumbnails using text, images, or icons.

    CODE:

    <thumbnail circle src="../../images/deer.jpg" size="100"/>
    <thumbnail circle text=":book:" background="#dff5ff" size="100"/>
    <thumbnail circle text="___CS___" background="#333" font-color="white" size="100"/>
    <thumbnail circle text=":fas-book:" font-color="darkgreen" border="3px solid darkgreen" size="100"/>
    
    <thumbnail src="../../images/deer.jpg" size="100"/>
    <thumbnail text=":book:" background="#dff5ff" size="100"/>
    <thumbnail text="___CS___" background="#333" font-color="white" size="100"/>
    <thumbnail text=":fas-book:" font-color="darkgreen" border="3px solid darkgreen" size="100"/>
    

    OUTPUT:

    πŸ“– CS

    πŸ“– CS

    Options

    Name Type Default Description
    alt string This must be specified if src is specified
    The alternative text of the image.
    background string Specifies the background color.
    Accepts any valid CSS background property
    border string Specifies the border thickness, type, and color.
    Accepts any valid CSS border property
    circle boolean false If this option is enabled, the thumbnail will be circle shaped instead of square
    font-color string The color of the text, affects normal text and icons (but not emojis)
    font-size string Text size, defaults to half of size, affects text, icons and emojis
    size string 100 The size of the thumbnail in pixels
    src string The URL of the image.
    The URL can be specified as absolute or relative references. More info in: Intra-Site Links
    text string The text to use in the thumbnail, icons, emojis and markdown are supported here

    If both text and src are specified, src will take higher priority.

    <thumb circle src="https://markbind.org/images/logo-lightbackground.png" size="100"/>
    
    Tooltips

    Hover An explanation, supports simple Markdownhere to see a tooltip.

    Tooltips

    CODE:

    <tooltip content="Lorem ipsum dolor sit amet" placement="top">
      <button class="btn btn-secondary">Popover on top</button>
    </tooltip>
    <tooltip content="Lorem ipsum dolor sit amet" placement="left">
      <button class="btn btn-secondary">Popover on left</button>
    </tooltip>
    <tooltip content="Lorem ipsum dolor sit amet" placement="right">
      <button class="btn btn-secondary">Popover on right</button>
    </tooltip>
    <tooltip content="Lorem ipsum dolor sit amet" placement="bottom">
      <button class="btn btn-secondary">Popover on bottom</button>
    </tooltip>
    <hr />
    Trigger
    <p>
      <tooltip content="Lorem ipsum dolor sit amet" placement="top" trigger="click">
        <button class="btn btn-secondary">Click</button>
      </tooltip>
      <br />
      <br />
      <tooltip content="Lorem ipsum dolor sit amet" placement="top" trigger="focus">
        <input placeholder="Focus"></input>
      </tooltip>
    </p>
    
    **Markdown**:
    <tooltip content="*Hello* **World**">
      <a href="">Hover me</a>
    </tooltip>
    <br />
    
    **Free Text**:
    <tooltip content="coupling is the degree of interdependence between software modules; a measure of how closely connected two routines or modules are; the strength of the relationships between modules."><i>coupling</i></tooltip>
    

    OUTPUT:

    Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet
    Trigger

    Lorem ipsum dolor sit amet

    Lorem ipsum dolor sit amet

    Markdown: Hello World Hover me

    Free Text: coupling is the degree of interdependence between software modules; a measure of how closely connected two routines or modules are; the strength of the relationships between modules.coupling

    Using trigger for Tooltip:

    CODE:

    More about <trigger for="tt:trigger_id">trigger</trigger>.
    <tooltip id="tt:trigger_id" content="This tooltip triggered by a trigger"></tooltip>
    <br>
    This is the same <trigger for="tt:trigger_id">trigger</trigger> as last one.
    

    OUTPUT:

    More about trigger. This tooltip triggered by a trigger
    This is the same trigger as last one.

    Triggers

    Trigger provides more flexibility in triggering contextual overlay via Tooltip, Popover or Modal.

    You could embed a Trigger within the text, and define the Tooltip, Popover or Modal at a separate location, which allows for a cleaner authoring flow.

    Specify the id attribute on the Tooltip, Popover or Modal component, and use the same id in the for attribute of the Trigger to allow the Trigger to invoke the specific overlay elements. Additionally, multiple Triggers could share the same overlay by providing them with the same id.

    Trigger's trigger attribute (which defaults to hover) is independent of the target's.

    Options

    Name Type Default Description
    trigger String hover How the overlay view is triggered.
    Supports: click, focus, hover.
    for String null The id for the overlay view to be shown.
    placement String auto How to position the Popover or Tooltip.
    Supports: auto, top, left, right, bottom.

    Options

    Name Type Default Description
    trigger String hover How the tooltip is triggered.
    Supports: click, focus, hover.
    content String '' Text content of the tooltip.
    placement String top How to position the tooltip.
    Supports: top, left, right, bottom.
    Hover <tooltip content="An explanation, **supports simple Markdown**">here</tooltip> to see a tooltip.
    

    Hover An explanation, supports simple Markdownhere to see a tooltip.


    1. Math

    2. Here is the footnote. Footnotes will appear at the bottom of the page.

    3. Here's one with multiple blocks.

      Subsequent paragraphs are indented to show that they belong to the previous footnote.

    4. Inlines notes are easier to write, since you don't have to pick an identifier and move down to type the note.

    Math

    Here is the footnote. Footnotes will appear at the bottom of the page.

    Here's one with multiple blocks.

    Subsequent paragraphs are indented to show that they belong to the previous footnote.

    Inlines notes are easier to write, since you don't have to pick an identifier and move down to type the note.