Skip to content

vitepress 中集成 tailwind

install

yarn add -D tailwindcss autoprefixer postcss

code

js
module.exports = {
  content: ["./docs/.vitepress/**/*.{js,ts,vue}", "./docs/**/*.md"],
};
css
@tailwind base;

@tailwind components;

@tailwind utilities;
js
import "./tailwind.postcss";

import DefaultTheme from "vitepress/theme";

export default { ...DefaultTheme };

then enjoy tailwind

使用预设模板

template

2025( )
今日 8.33%
本周 42.86%
本月 48.39%
本年 4.11%
Powered by Snowinlu | Copyright © 2024- | MIT License