Skip to content

Commit c2d6327

Browse files
authored
feat: add vitepress-plugin-group-icons (#225)
1 parent 689ab97 commit c2d6327

File tree

7 files changed

+173
-7
lines changed

7 files changed

+173
-7
lines changed

Diff for: .vitepress/config/shared.ts

+13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { dirname, resolve } from "node:path";
22
import { fileURLToPath } from "node:url";
33
import { HeadConfig, defineConfig } from "vitepress";
4+
import { groupIconMdPlugin, groupIconVitePlugin, localIconLoader } from "vitepress-plugin-group-icons";
45

56
const head: HeadConfig[] = [
67
[
@@ -75,7 +76,19 @@ export const sharedConfig = defineConfig({
7576
copyright: "Copyright © 2023-present Boshen & Oxc Contributors",
7677
},
7778
},
79+
markdown: {
80+
config(md) {
81+
md.use(groupIconMdPlugin);
82+
},
83+
},
7884
vite: {
85+
plugins: [
86+
groupIconVitePlugin({
87+
customIcon: {
88+
".oxlintrc": localIconLoader(import.meta.url, "../oxc-logo.svg"),
89+
},
90+
}),
91+
],
7992
resolve: {
8093
alias: [
8194
{

Diff for: .vitepress/oxc-logo.svg

+29
Loading

Diff for: .vitepress/theme/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import DefaultTheme from "vitepress/theme";
44
import AppBadgeList from "./components/AppBadgeList.vue";
55
import AppBlogPostHeader from "./components/AppBlogPostHeader.vue";
66
import Alert from "./components/Alert.vue";
7+
import "virtual:group-icons.css";
78

89
export default {
910
extends: DefaultTheme,

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"tsx": "^4.19.1",
3030
"typescript": "~5.6.0",
3131
"vitepress": "1.3.4",
32+
"vitepress-plugin-group-icons": "^1.2.4",
3233
"vue": "^3.5.8"
3334
},
3435
"lint-staged": {

0 commit comments

Comments
 (0)