@catppuccin/highlightjs

中文文档
1.0.1发布于 2025/03/29MIT零依赖构建来源已验证近 30 天下载 3万

Soothing pastel theme for Highlight.js

原始使用文档
文档目录6 节
  1. Catppuccin for Highlight.js
  2. Previews
  3. Usage
  4. npm
  5. CDN
  6. 💝 Thanks to

Logo
Catppuccin for Highlight.js

Previews

🌻 Latte
🪴 Frappé
🌺 Macchiato
🌿 Mocha

Usage

Add the CSS for your preferred flavor in your markup. You can do this by either getting the files from npm, or through a CDN.

npm

Install the @catppuccin/highlightjs package with your preferred package manager.

npm install -D @catppuccin/highlightjs

You can then use the files in @catppuccin/highlightjs/css or @catppuccin/highlightjs/sass.

CDN

Embed the Highlight.js script along with one of our themes.

[!NOTE] The "variable version" assumes that you have a flavor of Catppuccin already present in your CSS variables, in any format of color (e.g. --ctp-mauve: rgb(136, 57, 239), --ctp-mauve: #8839ef, --ctp-mauve: hsl(266deg, 85%, 58%), etc). If you use Catppuccin for TailwindCSS, where your variables are in the format of three comma-separated RGB values (e.g. --ctp-mauve: 136,57,239), you should use the "rgb variable" version.

unpkg

<link rel="stylesheet" href="//unpkg.com/@catppuccin/[email protected]/css/catppuccin-latte.css">
<link rel="stylesheet" href="//unpkg.com/@catppuccin/[email protected]/css/catppuccin-frappe.css">
<link rel="stylesheet" href="//unpkg.com/@catppuccin/[email protected]/css/catppuccin-macchiato.css">
<link rel="stylesheet" href="//unpkg.com/@catppuccin/[email protected]/css/catppuccin-mocha.css">
<!-- Variable version -->
<link rel="stylesheet" href="//unpkg.com/@catppuccin/[email protected]/css/catppuccin-variables.css">
<!-- Variable version with !important (higher specificity) -->
<link rel="stylesheet" href="//unpkg.com/@catppuccin/[email protected]/css/catppuccin-variables.important.css">
<!-- RGB variable version -->
<link rel="stylesheet" href="//unpkg.com/@catppuccin/[email protected]/css/catppuccin-variables.rgb.css">
<!-- RGB variable version with !important (higher specificity) -->
<link rel="stylesheet" href="//unpkg.com/@catppuccin/[email protected]/css/catppuccin-variables.rgb.important.css">

jsDelivr

<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@catppuccin/[email protected]/css/catppuccin-latte.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@catppuccin/[email protected]/css/catppuccin-frappe.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@catppuccin/[email protected]/css/catppuccin-macchiato.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@catppuccin/[email protected]/css/catppuccin-mocha.css">
<!-- Variable version -->
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@catppuccin/[email protected]/css/catppuccin-variables.css">
<!-- Variable version with !important (higher specificity) -->
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@catppuccin/[email protected]/css/catppuccin-variables.important.css">
<!-- RGB variable version -->
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@catppuccin/[email protected]/css/catppuccin-variables.rgb.css">
<!-- RGB variable version with !important (higher specificity) -->
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@catppuccin/[email protected]/css/catppuccin-variables.rgb.important.css">

💝 Thanks to

 

Copyright © 2021-present Catppuccin Org

版本与发布记录

@catppuccin/highlightjs 共发布 10 个版本,首次发布于 2023/02/06;过去 12 个月发布了 0 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.0.1latest2025/03/291.6 年前
1.0.02024/09/112 年前
0.2.22024/05/242 年前
0.2.12024/05/242 年前
0.2.02024/05/242 年前
0.1.42023/12/012 年前

关于 @catppuccin/highlightjs 的常见问题

@catppuccin/highlightjs 是什么?

Soothing pastel theme for Highlight.js

如何安装 @catppuccin/highlightjs?

在项目目录运行 npm install @catppuccin/highlightjs,或使用 pnpm add / yarn add / bun add。

@catppuccin/highlightjs 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/catppuccin__highlightjs 是否存在。

@catppuccin/highlightjs 可以商用吗?

@catppuccin/highlightjs 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@catppuccin/highlightjs 的下载量有多少?

根据 npm 官方下载统计,@catppuccin/highlightjs 在 2026/10/09 – 2026/11/07 这 30 天内被下载 29,702 次,日均约 990 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@catppuccin/highlightjs 还在维护吗?

最新版本 1.0.1 发布于 2025/03/29(1.6 年前);至今共发布 10 个版本,其中过去 12 个月发布了 0 个;首次发布于 2023/02/06。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。