Skip to content

Commit 9bb7cab

Browse files
committed
feat: add custom icons collection
1 parent ab76f56 commit 9bb7cab

6 files changed

Lines changed: 42 additions & 19 deletions

File tree

‎app/app.config.ts‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,24 @@ export default defineAppConfig({
110110
},
111111
},
112112
prose: {
113+
codePreview: {
114+
slots: {
115+
preview: 'flex-col *:w-full [&_a]:w-fit',
116+
},
117+
},
118+
codeIcon: {
119+
'nitro.config.ts': 'i-unjs-nitro',
120+
'astro.config.mjs': 'i-simple-icons:astro',
121+
astro: 'i-simple-icons:astro',
122+
nitro: 'i-unjs-nitro',
123+
md: 'i-custom-comark',
124+
mdc: 'i-custom-comark',
125+
react: 'i-logos-react',
126+
html: 'i-vscode-icons-file-type-html',
127+
svelte: 'i-logos-svelte-icon',
128+
nuxt: 'i-logos-nuxt-icon',
129+
angular: 'i-logos-angular-icon',
130+
},
113131
codeGroup: {
114132
slots: {
115133
list: 'bg-muted',

‎app/app.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ useSeoMeta({
5353
5454
provide('navigation', navTree)
5555
56-
const colorMode = useColorMode()
56+
// const colorMode = useColorMode()
5757
const historyOpen = useVersionHistory()
5858
5959
const { assistant } = useAppConfig()

‎app/assets/icons/comark.svg‎

Lines changed: 1 addition & 0 deletions
Loading

‎app/components/AppHeader.vue‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,6 @@ const navigation = useMainNavigation()
2727
label="Ask AI"
2828
color="neutral"
2929
variant="outline"
30-
class="hidden lg:inline-flex"
31-
@click="assistantOpen = true"
32-
/>
33-
34-
<UButton
35-
v-if="assistant?.enabled"
36-
icon="i-lucide-sparkles"
37-
aria-label="Ask AI"
38-
color="neutral"
39-
variant="outline"
40-
:ui="{ leadingIcon: 'size-4' }"
41-
class="p-2 lg:hidden"
4230
@click="assistantOpen = true"
4331
/>
4432

‎nuxt.config.ts‎

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { resolveModulePath } from 'exsolve'
22
import { defineNuxtConfig } from 'nuxt/config'
3-
import { layerIconCollections } from './utils/icons'
3+
// import { layerIconCollections } from './utils/icons'
4+
import { createResolver } from 'nuxt/kit'
5+
6+
const { resolve } = createResolver(import.meta.url)
47

58
export default defineNuxtConfig({
69
compatibilityDate: '2026-06-09',
@@ -14,17 +17,25 @@ export default defineNuxtConfig({
1417
'nuxt-og-image',
1518
'@nuxtjs/mcp-toolkit',
1619
],
17-
ui: { content: true, prose: true },
18-
sitemap: {
20+
ui: {
21+
content: true,
22+
prose: true
23+
},
24+
sitemap: {
1925
sources: ['/api/__sitemap__/urls'], exclude: ['/tree/**', '/blob/**']
2026
},
2127
ogImage: { zeroRuntime: false },
2228
icon: {
2329
provider: 'iconify',
24-
customCollections: layerIconCollections() as never,
25-
clientBundle: {
30+
customCollections: [
31+
{
32+
prefix: 'custom',
33+
dir: resolve('app/assets/icons'),
34+
},
35+
],
36+
clientBundle: {
2637
scan: true,
27-
includeCustomCollections: false
38+
includeCustomCollections: true
2839
},
2940
},
3041
vite: {

‎playground/content/1.getting-started/1.introduction.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ Content lives as Markdown in your repository. In development it is read from the
1212
::note
1313
This playground exercises the layer end-to-end: navigation, search, TOC, prev/next links, raw markdown mirrors and the version history panel.
1414
::
15+
16+
17+
```md [test.md]
18+
coucou
19+
```

0 commit comments

Comments
 (0)