vitepress-theme-tui
Example
This page demonstrates the various Markdown extensions available in VitePress with vitepress-theme-tui
.
Headers and Anchors
H1 Header
H2 Header
H3 Header
H4 Header
H5 Header
H6 Header
Horizontal Rule
Blockquotes
This is a blockquote.
It can span multiple lines.
You can also include code blocks inside blockquotes.
jsconsole.log('This is a code block inside a blockquote.')
Links
Internal Links
- Home - Links to the home page
- This Guide - Links to this guide
External Links
Frontmatter
This page uses frontmatter for metadata (not visible in the content).
Tables
Feature | Description | Support |
---|---|---|
Headers | Support for H1-H6 headers | Yes |
Links | Internal and external links | Yes |
Tables | GitHub-style tables | Yes |
Code Blocks | Syntax highlighting | Yes |
Custom Blocks | Info, tip, warning, danger, details | Yes |
Emoji Support
🎉 🚀 😄 💻 ✨
Table of Contents
Custom Containers
Default Containers
INFO
This is an info box.
TIP
This is a tip.
WARNING
This is a warning.
DANGER
This is a dangerous warning.
Details
This is a details block.
Custom Titles
STOP
Danger zone, do not proceed
Click me to view the code
console.log('Hello, Terminal UI!')
GitHub-flavored Alerts
NOTE
This is a note alert.
TIP
This is a tip alert.
IMPORTANT
This is an important alert.
WARNING
This is a warning alert.
CAUTION
This is a caution alert.
Code Blocks with Syntax Highlighting
// JavaScript code
function hello() {
console.log('Hello, Terminal UI!')
}
<!-- HTML code -->
<div class="terminal">
<h1>Terminal UI</h1>
<p>This is a terminal-style UI theme.</p>
</div>
/* CSS code */
.terminal {
background-color: #000;
color: #0f0;
font-family: monospace;
}
Line Highlighting in Code Blocks
function highlightExample() {
// This line is highlighted
const message = 'Terminal UI';
// These lines are also highlighted
console.log(message);
return message;
}
Focus in Code Blocks
function focusExample() {
const message = 'Terminal UI'
console.log(message)
return message
}
Colored Diffs in Code Blocks
function diffExample() {
const oldMessage = 'VitePress'
const newMessage = 'Terminal UI'
console.log(message)
}
Errors and Warnings in Code Blocks
function errorWarningExample() {
const error = 'This is an error'
const warning = 'This is a warning'
console.log(error, warning)
}
Code Groups
// JavaScript configuration
export default {
theme: 'terminal-ui',
title: 'My Documentation'
}
// TypeScript configuration
interface Config {
theme: string;
title: string;
}
const config: Config = {
theme: 'terminal-ui',
title: 'My Documentation'
}
export default config;
Style Isolation with vp-tui-raw
The vp-tui-raw
class allows you to display content with the default VitePress styling instead of vitepress-theme-tui
styling.
Default VitePress Heading
This content uses the default VitePress styling instead of the terminal-inspired styling.
Code Blocks Example
// This code block uses default VitePress styling
function example() {
console.log('Hello, VitePress!');
return 'Default styling';
}
Blockquotes Example
This blockquote uses the default VitePress styling.
It looks different from the terminal-styled blockquotes.
Mixed Content Example
Mixed Content
This section contains various elements with default styling:
- List item 1
- List item 2
- List item 3
// Code block with default styling
const message = 'Hello, VitePress!';
console.log(message);
A blockquote with default styling
Column 1 | Column 2 |
---|---|
Cell 1 | Cell 2 |
Cell 3 | Cell 4 |