all repos — hastyscribe @ 26a5547e337e9c19a344d8c8c0c797bcc8f3c919

A professional markdown compiler.

doc/-syntax-block-classes.md

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
# Class Blocks 

## Notes

[Discount][discount] supports the definition of _class blocks_: [div](class:kwd)s with a class attribute. The syntax is very similar to the one used for [block quotes](#Block.Quotes), with the addition of the class name wrapped in [%](class:kwd)s on the first line. 

In {{hs}}, this syntax is used to produce notes, [tips](#Tips), [warmings](#Warnings), [sidebars](#Sidebars) and [terminal sessions](#Terminal.Sessions).

{{input-text}}

~~~
> %note%
> Note
> 
> This is a note.
~~~

{{output-text}}

> %note%
> Note
> 
> This is a note.

## Tips

Tips are used for optional information that can help the user in some way. 

{{input-text}}

~~~
> %tip%
> Tip
> 
> This is a tip.
~~~

{{output-text}}

> %tip%
> Tip
> 
> This is a tip.

## Warnings

Warnings are used for important information the user should not overlook. 

{{input-text}}

~~~
> %warning%
> Warning
> 
> This is a warning or an important note.
~~~

{{output-text}}

> %warning%
> Warning
> 
> This is a warning or an important note.

## Sidebars

Sidebars are used for digressions and asides. 

{{input-text}}

~~~
> %sidebar%
> This is a _sidebar_
> 
> Although not always placed on the side of the page, _sidebars_ contain 
> additional content and asides.
~~~

{{output-text}}

> %sidebar%
> This is a _sidebar_
> 
> Although not always placed on the side of the page, _sidebars_ contain additional content and asides.


## Terminal Sessions

Terminal sessions are used to display commands entered in a terminal, in sequence, without displaying their output. 

{{input-text}}

~~~
> %terminal%
> 
> cd src
> 
> ./configure
> 
> make && sudo make install
~~~

{{output-text}}

> %terminal%
> cd src
> 
> ./configure
> 
> make && sudo make install

If commands must be executed as a super-user, use the [terminal-su](class:kwd) class instead:

{{input-text}}

~~~
> %terminal-su%
> 
> shutdown -h now
~~~

{{output-text}}

> %terminal-su%
> 
> shutdown -h now