A blogging platform using VitePress.
- Markdown-based posts
- Code syntax highlighting
- Customizable theme
- Tags and Categories
- Posts Archives
- Cloudflare Pages deployment
- Clone the repository.
- Run
pnpm install
to install the dependencies. - Run
cp .env.example .env
to create a.env
file and set the environment variables.
- Run
pnpm dev
to start the development server.
There is a scripts/new_post.sh
script that can be used to create a new post.
- Run
chmod +x ./scripts/new_post.sh
to make the script executable. - Run
pnpm new:post <post title>
to create a new post. (e.g.pnpm new:post test post
) - Edit the newly created markdown file in the
docs/posts
directory.
Note: Only posts that have
published: true
in the front matter will be displayed on the site.
- Run
pnpm build
to build the site. - The built site will be in the
dist
directory. - You can preview the built site by running
pnpm preview
.
This template is designed to be deployed to Cloudfare Pages. You can deploy it to other platforms, but you may need to adjust the configuration.
There is a scripts/wr_pages-build.mjs
script that generates the wrangler.toml
file for the Cloudflare Pages project.
- Run
pnpm pages:deploy
to deploy the site to Cloudflare Pages.
- Run
wrangler whoami
to ensure you are logged in to Cloudflare locally. - Run
pnpm pages:toml
to create thewrangler.toml
file for the Cloudflare Pages project. - Run
pnpm pages:create
and follow the prompts to create a new Cloudflare Pages project.
- Wrangler Commands | Cloudflare Docs
- Cloudflare Workers
- Add a new domain for the pages project | Cloudflare API Docs
In the spirit of open source, this project is licensed under the MIT License. See the LICENSE file for more information.