Internal Syntax
Some extensions to the standard Markdown syntax have been added for the vCZYZ KB. They are described below.
It’s possible to add any Starlight, remark or rehype plugin to the KB to support further syntax extensions. If you find one that you think may be useful, let tech support know.
The internal syntax will only be rendered properly on the website as it requires custom plugins. When editing locally in VS Code, you will only see the raw text in the Markdown Preview window. Therefore, be extra careful to follow the syntax rules.
Callouts
Section titled “Callouts”Callouts are a special type of blockquote that you can use when trying to highlight important information. The syntax is:
Prettier will collapse your body text into the same line as the title text by
default. To avoid this, add two spaces after the title text on the same line
like so: Title text .
Callout Types
Section titled “Callout Types”To use a specific callout, use the syntax above and type an all-lowercase version of the title or alias you would like as the callout type.
The title/alias determines the default title. If you want to keep the default title, add two spaces after the closing bracket of the type to prevent Prettier from collapsing it, then make a new line for your content. If you want to change the title, use the format shown above.
This callout will have the default title of “Note”.
Alias: summary
Aliases: hint, important
Aliases: check, done
Alias: help
Aliases: caution, attention
Aliases: failure, missing
Alias: error
Alias: cite
You can make a callout collapsible by adding a hyphen after the closing bracket of the type.
Some custom title
Some hidden content
vCZYZ KB Callouts
Section titled “vCZYZ KB Callouts”There are several vCZYZ KB-specific callout types that you can use in addition to the callout types shown above. However, these differ in that they do not support having a title. The callout will show all text in one line (until it wraps), regardless of how many lines it has.
Aside from the zyzNote and zyzCaution types which can be used freely as
subtler versions of the normal note and caution callouts, the rules on when
to use these callout types can be found in
Phraseology Formatting.
The callout types are abbreviated to avoid excessive line length. To help you remember:
- All start with
zyz St= Syntax (which are also the ones with a blue background)Ex= ExamplePh= PhraseologyCon= ControllerPlt= Pilot
Renders as:
Callout Icons
Section titled “Callout Icons”If you need just the icon from one of the ZYZ callouts (not the normal ones!) without the entire callout, use this directive and one of the ZYZ callout types:
Inline Callouts
Section titled “Inline Callouts”Do not use this method of writing a callout unless you are in a table or other environment where the normal method does not work. If you use the inline format unnecessarily, your pull request will be rejected.
Markdown tables don’t support blockquotes, which means callouts also can’t be written in a table cell. The following directive permits adding a callout in a table cell:
hello I am callout content
If the title for an inline callout contains a space, encase the title in quotes.
The ID (#id) and class (.class1 .class2) attributes can be added if
necessary.
Inline List Directives
Section titled “Inline List Directives”Do not use this method of writing a list unless you are in a table or other environment where the normal method does not work. If you use the inline format unnecessarily, your pull request will be rejected.
Lists are also block elements, and as such also don’t work inside table cells. The normal workaround is writing raw HTML like this:
…which isn’t ideal. The following directive allows creating lists (and nested lists) within a table:
| Col A | Col B |
|---|---|
|
|
| item1 |
Usage:
- Items must be separated by semicolons.
- Any normal inline Markdown syntax can be used (block-level elements like blockquotes don’t work).
- The attributes (curly braces) are optional. Options are:
bullet: Type of bullet to use. If the attribute is omitted, the list will be a bullet list (HTML<ul>). Options:num: Numbered list (HTML<ol>).none: No bullets. Use instead of writing a bunch of<br>s. Do not use this type in, or as a nested list.
#someId: Sets the HTML ID of the list..class1 .class2: Sets the HTML class(es) of the list.
Table Directives
Section titled “Table Directives”The vCZYZ KB has certain styles that can be applied to Markdown tables. They are applied using directives, which is a line of text that starts with two colons (::) placed above the table that it is to be applied to and has special syntax.
Directives must be:
- Each on their own line
- Spaced by exactly one line:
- Between the first directive and any content above it (unless it’s the first line in a doc),
- Between each directive, and
- Between the last directive and the table itself.
As mentioned above, this syntax only works on the website. If you open the VS Code preview pane, you will see the directives displayed in plain text. The website will apply the styles and hide the directive. In other words, if you see the raw directive text visible on the website, you did not use it correctly.
For comparison’s sake, here’s a normal table:
| Header 1 | Header 2 |
|---|---|
| Cell 1 | Cell 2 |
| Cell 3 | Cell 4 |
Full Table Directives
Section titled “Full Table Directives”The first type of directive is used to apply styles to the entire table. The
keyword is table.
The available styles (classes) to apply to the whole table are:
-
.no-border:- Removes all outer and inner borders that are applied by default to Markdown tables.
Header 1 Header 2 Cell 1 Cell 2 Cell 3 Cell 4 -
.no-header:- Renders the first row as normal text instead of bolded, which it is by default.
NoteThis removes the header ‘style’, but the header still ‘exists’ in terms of the specification. In other words, you treat the cell “Header 1” from the example as your first cell, and you must still include the table row containing the line of hyphens when you write the table.
Header 1 Header 2 Cell 1 Cell 2 Cell 3 Cell 4
Table Column Directives
Section titled “Table Column Directives”The second type of directive is used to apply styles to a single column of a
table. The keyword is column.
The syntax is similar to the table style directive, but you must also specify which column the style is to be applied to. Columns are numbered from the left, beginning at 1.
The available styles (classes) to apply to a column are:
-
.syntax: Applies the ‘phraseology rules’ light blue shading colour to the entire column. Also offsets it to the right slightly to avoid the text touching the edge of the shading.Header 1 Header 2 Cell 1 Cell 2 Cell 3 Cell 4 -
.no-wrap: Prevents the text in the column from wrapping onto a new line. This allows you to control the column width using the text within any cell.WarningThe table may become wider than the page width if you aren’t careful. Use this style sparingly and keep in mind some people may be reading on mobile devices with slimmer screens. Below is an extremely exaggerated example of the potential consequences.
Header 1 Header 2 Cell 1 Extra text Extra text Extra text Extra text Extra text Extra text Extra text Extra text Extra text Extra text Cell 2 Cell 3 Cell 4
Table Cell Merging
Section titled “Table Cell Merging”Table Cells can be merged by filling a cell with one of the special characters below. If any other characters aside from the merging special character are present in a cell, it will not be merged.
>: Merge cell to the right^: Merge cell upwards
Only the content in the rightmost cell when merging horizontally or the topmost cell when merging vertically will be kept.
| Header 1 | Header 2 |
|---|---|
| Cell 1 | Cell 2 |
| Cell 3 text text text text text text | |
| Cell 4 text text text text text text | |
| Cell 5 | Cell 6 |
| Cell 7 | |
| Cell 8 | |