Markdown Extensions
SolidBase comes with many markdown extensions from GFM to fully custom ones. All of their options and usage examples are listed here.
Autolinked Titles
All titles will have an associated unique slug and self link.
will generate:
External Links
Outbound links automatically get target="_blank" rel="noreferrer"
:
Frontmatter
YAML frontmatter is supported out of the box:
This data will be available to the rest of the page, along with all custom and theming components.
For more details, see Frontmatter.
Table of Contents
Input
Output
Directives
Directives can be defined by their types, titles, and contents.
Default Title
Input
Output
Highlights information that users should take into account, even when skimming.
Optional information to help a user be more successful.
Crucial information necessary for users to succeed.
Critical content demanding immediate user attention due to potential risks.
Negative potential consequences of an action.
details
This is a details block.
Custom Title
You can set a custom title between square brackets []
after the "type" of the directive.
Input
Output
Highlights information that users should take into account, even when skimming.
Click me to view
This is a details block.
GitHub Flavored Markown
Alerts
SolidBase also supports GitHub-flavored alerts to render as callouts. They will be rendered the same as the custom containers.
Highlights information that users should take into account, even when skimming.
Optional information to help a user be more successful.
Crucial information necessary for users to succeed.
Critical content demanding immediate user attention due to potential risks.
Negative potential consequences of an action.
Autolinks
All text matching link patterns will automatically be converted into a link:
Input
Output
start.solidjs.com https://github.com/kobaltedev/solidbase
Strikethrough
Strikethrough text is any text wrapped in a matching pair of one or two tildes (~
).
Input
Output
Hi Hello, there world!
Tables
Input
Output
a | b | c | d |
---|---|---|---|
longword | longword | longword | longword |
short | short | short | short |
Task List
Input
Output
- to do
- done
Kbd
While not a markdown syntax, a key input element can be written using html.
Input
Output
Ctrl + C
Footnotes
Footnotes can be added anywhere in the document and a link will be generated pointing to it. All notes are inserted at the end of the document with a corresponding backlink.
Input
Output
A note1
Syntax Highlighting in Code Blocks
SolidBase uses Expressive Code to highlight language syntax in Markdown code blocks, using coloured text. Expressive Code supports a wide variety of programming languages and additional features. All you need to do is append a valid language alias to the beginning backticks for the code block:
Input
Output
A list of valid languages is available on GitHub.
Line Highlighting in Code Blocks
TODO: broken
Input
Output
In addition to a single line, you can also specify multiple single lines, ranges, or both:
- Line ranges: for example
{5-8}
,{3-10}
,{10-17}
- Multiple single lines: for example
{4, 7, 9}
- Line ranges and single lines: for example
{4, 7-13, 16, 23-27, 40}
Input
Output
Line Numbers
TODO: broken
You can enable line numbers for each code block by adding showLineNumbers
after the language.
Input
Output
Footnotes
-
Big note. ↩
Last updated: 11/15/24, 4:16 AM