VuePress 生态系统VuePress 生态系统
  • 主题指南
  • 默认主题
  • Hope 主题
  • Plume 主题
  • Reco 主题
  • 功能插件
  • Markdown 插件
  • 搜索插件
  • 博客插件
  • 渐进式应用插件
  • 统计分析插件
  • 搜索引擎优化插件
  • 开发插件
  • 工具插件
  • @vuepress/helper
  • English
  • 简体中文
GitHub
  • 主题指南
  • 默认主题
  • Hope 主题
  • Plume 主题
  • Reco 主题
  • 功能插件
  • Markdown 插件
  • 搜索插件
  • 博客插件
  • 渐进式应用插件
  • 统计分析插件
  • 搜索引擎优化插件
  • 开发插件
  • 工具插件
  • @vuepress/helper
  • English
  • 简体中文
GitHub
  • active-header-links
  • git
  • palette
  • reading-time
  • rtl
  • Sass Palette
    • 指南
    • 配置
  • theme-data
  • toc

sass-palette

@vuepress/plugin-sass-palette

这个插件主要面向插件和主题开发者,相比 @vuepress/plugin-palette 更加强大。

提示

你应该在你的项目中手动安装这些依赖:

  • 当使用 Vite 打包工具时:sass-embedded
  • 当使用 Webpack 打包工具时:sass-embedded 和 sass-loader

使用

你必须在插件初始化期间调用 useSassPalettePlugin 函数来使用此插件。

npm i -D @vuepress/plugin-sass-palette@next
你的插件或主题入口
import { useSassPalettePlugin } from 'vuepress-plugin-sass-palette'

export const yourPlugin = (options) => (app) => {
  useSassPalettePlugin(app, {
    // 插件选项
  })

  return {
    // 你的插件 API
  }
}
在 GitHub 上编辑此页
上次更新: 2025/1/10 18:07
贡献者: Mister-Hope, meteorlxy, pengzhanbo
Prev
rtl
Next
theme-data