Markdown Extension Examples
This page demonstrates some of the built-in markdown extensions provided by VitePress.
Syntax Highlighting
VitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:
This is a quote:
This is a quote.
This is a blockquote:
This is a blockquote.
This is a second paragraph in the blockquote.
This is a blockquote with a nested blockquote. And this blockquote is separated from the previous blockquote by a blank line.
This is a nested blockquote.
This is a second paragraph in the nested blockquote.
Nest more!
This is the last paragraph in the nested blockquote.
This is a second paragraph in the blockquote.
Horizontal Rule:
Code Block
With line numbers and a starting line number:
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0">
<meta name="robots" content="noodp" />
<!-- Stylesheets -->
<title>{{ config.title }}</title>
</head>
With line numbers and highlighted lines:
c#
using System;
namespace HelloWorld
{
class Hello
{
static void Main()
{
Console.WriteLine("Hello World!");
// Keep the console window open in debug mode.
Console.WriteLine("Press any key to exit.");
Console.ReadKey();
}
}
}