link: vitepress
VitePress is a Static Site Generator (SSG) designed for building fast, content-centric websites. In a nutshell, VitePress takes your source content written in Markdown, applies a theme to it, and generates static HTML pages that can be easily deployed anywhere.
In short, vitepress gets md as input and output formatted html.
link: cloudflare pages.
Cloudflare pages offers a fast, secure, and often free way to host static websites, leveraging Cloudflare's extensive global network to deliver content quickly to users worldwide.
In short, it deploys a domain for the html generated by vitepress for worldwide users to access it.
-
create a .md file and fill it with desired content. e.g. /life.md
-
in
/.vitepress/config.mts
append{ text: <name>, link: '<the relative path but without suffix. e.g. /life>' }to
sidebar: [
{
text: '内容',
items: [
xxxx
<here>
]
}
],
or create another element in sidebar list.
same for the nav field.
- if you want to add access for this md in the Home page:
Inindex.md,
append- theme: alt(refer to vitepress doc for more themes) text: 生活 link: /lifeto
actions:
xxx
<here>
-
push to
masterand the website will be automatically updated. -
use
bun run docs:devto preview the page.