An optional category

An H1 header for this sample article

This is a sample article demonstrating the use of Markdown in Astro.

Author Gu Wei Publish Update

This is a sample article demonstrating the use of Markdown in Astro. It includes various Markdown features such as headings, paragraphs, lists, images, and code blocks. This is a paragraph. It has bold text, italic text, and monospace text. You can also use strikethrough and highlight text. This is a link to Google. This is a code block:

console.log('Hello, world!');

Headings

12345678901234567890123456789012345678901234567890123456789012345M789012345678901234567890123456789012345678901234567890

To create a heading, add number signs # in front of a word or phrase. The number of number signs you use should correspond to the heading level.

H2 - A quick brown fox jumps over the lazy dogs

H3 - A quick brown fox jumps over the lazy dogs

H4 - A quick brown fox jumps over the lazy dogs

H5 - A quick brown fox jumps over the lazy dogs
H6 - A quick brown fox jumps over the lazy dogs

Paragraph

To create paragraphs, use a blank line to separate one or more lines of text.

Ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Images

To add an image, add <Picture> in front of the image path. You can also specify the formats you want to use for the image. The formats should be in an array format, like this: formats={['avif', 'webp']}. The alt text should be specified as well.

Placeholder

Blockquotes

To create a blockquote, add a > in front of a paragraph. To create a blockquote with multiple paragraphs, add a > symbol to the empty lines between paragraphs. To cite sources, you can use the <cite> or <footer> tags for bibliographic references, while footnotes may be inserted using the [^1] or [^note] syntax.

Don’t communicate by sharing memory, share memory by communicating.

--- Rob Pike1


Code Blocks

To create a code block, add three backticks ````` at the start and end of your code. You can indicate the programming language being used after the opening backticks to indicate how to color and style your code, for eg. html, javascript, css, markdown etc.

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Example HTML5 Document</title>
  </head>
  <body>
    <p>Test</p>
  </body>
</html>

Other

  1. This is a numbered list.
    1. This is a sub-item in the list.
  2. This is a second item in the list.
  3. This is a third item in the list.
  4. This is a fourth item in the list. Overlong text will be wrapped to the next line and will be displayed in the same line.
  5. This is a fifth item in the list.
  6. This is a sixth item in the list.
  7. This is a seventh item in the list.
  8. This is an eighth item in the list.
  9. This is a ninth item in the list.
  10. This is a tenth item in the list.

H2O

Xn + Yn = Zn

Press CTRL + ALT + Delete to end the session.

There is nothing no code either good or bad, but running it makes it so.

Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures.

Paragraphs are separated by a blank line.

Here’s a link to a website, to a local doc, and to a section heading in the current doc. Here’s a footnote2.

Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., “it’s all in chapters 12—14”). Three dots … will be converted to an ellipsis. Unicode is supported. ☺

Here’s a table:

WeightSize
Framework 132.9 lbs11.67x9x0.62 inches
Macbook Air M22.7 lbs11.97x8.46x0.44 inches
Macbook Pro M13.0 lbs11.97x8.36x0.61 inches

Here’s a table:

ItalicsBoldCode
italicsboldcode
italicsboldcode

Footnotes

  1. The above quote is excerpted from Rob Pike’s talk during Gopherfest, November 18, 2015.

  2. Footnote text goes here.