vitepress-theme-sakura

vitepress-theme-sakura

Usage no npm install needed!

<script type="module">
  import vitepressThemeSakura from 'https://cdn.skypack.dev/vitepress-theme-sakura';
</script>

README

vitepress-theme-sakura

comming s∞n

preview

preview

Quick start

Install dependencies

pnpm add vitepress vitepress-theme-sakura sass

Create config files

.vitepress/config.ts

import { ThemeConfig } from 'vitepress-theme-sakura'
import { defineConfigWithTheme } from 'vitepress'
export default defineConfigWithTheme<ThemeConfig>({
  lang: 'zh-CN',
  head: [
    ['script', { src: 'https://cdn.jsdelivr.net/npm/@waline/client' }],
    ['link', { rel: 'stylesheet', href: 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.0.0/css/regular.min.css' }],
    ['link', { rel: 'stylesheet', href: 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.0.0/css/all.min.css' }],
    ['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Noto+Serif+SC' }]
  ],
  markdown: {
    lineNumbers: true
  },
  themeConfig: {
    // ...
  }
})

To see all configurable options in themeConfig, click ThemeConfig in the first line to jump to the definition.

.vitepress/theme/index.ts

export { default } from 'vitepress-theme-sakura'

Then write articles and save to posts/*.md, then run vitepress dev for preview, run vitepress build for release.

thanks