Basic Writing and Formatting Syntax
This guide is an abstraction from Github's Formatting Syntax documentation.
We are using it to show the various styles that we have available.
Headings
To create a heading, add one to two # symbols before your heading text. The number of # you use will determine the hierarchy level and typeface size of the heading.
Styling Text
You can indicate emphasis with bold, italic, strikethrough, subscript, or superscript text in comment fields and .md files.
Quoting Text
You can quote text with a >.
Links
You can create an inline link by wrapping link text in brackets, and then wrapping the URL in parentheses.
Lists
You can make an unordered list by preceding one or more lines of text with -.
To order your list, precede each line with a number.
Footnotes
You can add footnotes to your content by using this bracket syntax [^1]
and then defining the footnote at the bottom of your content.
Preview
You can preview your markdown content in real-time by using the preview feature in the editor. We have been using it throughout this guide to show you how your markdown content will look when rendered. It comes with a single prop, codeblock, that you can use to display the code block right below the preview.
<Preview>
<div className="bg-gray-2 border-gray-4 border w-32 h-16 rounded"/>
</Preview>
Inline Code
Append {:lang}{:js}
(e.g. {:js}{:js}
) to the end of inline code to highlight it like a regular code block.
To useEffect or not to useEffect()
, that is the question.
This is an array `[1, 2, 3]{:js}` of numbers 1 through 3.
Code Blocks
To format code or text into its own distinct block, use triple backticks.
function feature() {
return "It works in my environment.";
}
```tsx
function feature() {
return "It works in my environment.";
}
```
Media
You can embed images, videos, and other media in your markdown content. You can also add captions to your images via the <Image/>
component.
<Image src='https://avatar.vercel.sh/sylph' alt='Placeholder' caption='Avatar'/>
Tables
You can create tables by assembling a list of words and dividing them with hyphens - (for the first row), and then separating each column with a pipe |.
First Header | Second Header |
---|---|
Content Cell | Content Cell |
Content Cell | Content Cell |
| First Header | Second Header |
| ------------- | ------------- |
| Content Cell | Content Cell |
| Content Cell | Content Cell |