Skip to content

Commit

Permalink
chore: add icons and auto import
Browse files Browse the repository at this point in the history
  • Loading branch information
rileychh committed Aug 31, 2024
1 parent d69e5f5 commit 9d34ce0
Show file tree
Hide file tree
Showing 5 changed files with 242 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ lerna-debug.log*
.env
.env.*
!.env.example

# unplugin-vue-components
components.d.ts
16 changes: 16 additions & 0 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
import { defineConfig } from 'vitepress'
import Components from 'unplugin-vue-components/vite'
import Icons from 'unplugin-icons/vite'
import IconsResolver from 'unplugin-icons/resolver'

// https://vitepress.dev/reference/site-config
export default defineConfig({
vite: {
plugins: [
Components({
// Auto import components and icons in Vue and Markdown files
dirs: ['../components'],
include: [/\.vue($|\?)/, /\.md($|\?)/],
resolvers: [
IconsResolver({ prefix: 'icon' }),
],
}),
Icons({ compiler: 'vue3' }),
],
},
title: 'COSCUP 2024',
description: 'A VitePress Site',
srcDir: 'content',
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
},
"devDependencies": {
"@antfu/eslint-config": "2.25.1",
"@iconify-json/ph": "1.1.14",
"eslint": "9.9.0",
"eslint-plugin-format": "0.1.2",
"husky": "9.1.4",
"lint-staged": "15.2.8",
"typescript": "5.5.4",
"unplugin-icons": "0.19.2",
"unplugin-vue-components": "0.27.4",
"vitepress": "1.3.2",
"vue-tsc": "2.1.2"
},
Expand Down
Loading

0 comments on commit 9d34ce0

Please sign in to comment.