Elements
MDX typography and components used across Heff.world content pages
Headings
Reference for heading levels in MDX (# β¦ ######). Use one h1 per page; prefer h2βh4 in body copy.
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Admonition
This is my own component which is auto-imported in all mdx files. You can use it like:
<Admonition variant="info">Your text here</Admonition>TIP
Admonition variant="tip". Use this to provide a cool tip.
CAUTION
Admonition variant="caution". Use this to warn people of potential issues.
DANGER
Admonition variant="danger". Use this to tell people not to do something.
INFO
Admonition variant="info". Use this to provide extra secret sauce.
Emphasis
The emphasis, aka italics, with asterisks or underscores.
Strong emphasis, aka bold, with asterisks or underscores.
The combined emphasis with asterisks and ***underscores***.
Strikethrough uses two tildes. Scratch this.
Link
Iβm an inline-style link with title
You can use numbers for reference-style link definitions
Or leave it empty and use the link text itself.
example.com (but not on Github, for example).
Some text to show that the reference links can follow later.
Paragraph
Short body copy reads best on the web: one idea per paragraph, plain language, and enough context that a skimmer still gets the point.
Ordered List
List item
List item
List item
List item
List item
Unordered List
List item
List item
List item
List item
List item
Code and Syntax Highlighting
This is an Inline code sample.
var s = "JavaScript syntax highlighting";
alert(s);s = "Python syntax highlighting"
print sBlockquote
This is a blockquote example.
Tables
| Markdown | Less | Pretty |
|---|---|---|
| Still | renders | nicely |
| 1 | 2 | 3 |
There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you donβt need to make the raw Markdown line up prettily. You can also use inline Markdown.