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( )
今日 29.17%
本周 57.14%
本月 32.26%
本年 52.33%
Powered by Snowinlu | Copyright © 2024- | MIT License