From 58e1ea8da1774920b80b02410df423812ac0d879 Mon Sep 17 00:00:00 2001 From: Neko Ayaka Date: Mon, 24 Feb 2025 00:17:32 +0800 Subject: [PATCH] fix(unlazy-img): extra pattern for glob to search --- docs/uno.config.ts | 48 +++++++++++++++++++- packages/markdown-it-unlazy-img/src/index.ts | 2 + 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/docs/uno.config.ts b/docs/uno.config.ts index a53f5ed3..a661c8ab 100644 --- a/docs/uno.config.ts +++ b/docs/uno.config.ts @@ -1,3 +1,47 @@ -import * as UnoCSSConfig from '../uno.config' +import { + defineConfig, + presetAttributify, + presetIcons, + presetUno, + presetWebFonts, +} from 'unocss' -export default UnoCSSConfig +export default defineConfig({ + shortcuts: [], + presets: [ + presetUno({ + dark: 'class', + }), + presetAttributify(), + presetIcons({ + prefix: 'i-', + scale: 1.2, // size: 1.2 rem + extraProperties: { + 'display': 'inline-block', + 'vertical-align': 'middle', + 'min-width': '1.2rem', + }, + }), + presetWebFonts({ + fonts: { + 'chakra-petch': ['Chakra Petch'], + 'baloo-2': [ + { + name: 'Baloo 2', + }, + { + name: 'Noto Sans', + }, + { + name: 'Roboto', + }, + { + name: 'sans-serif', + provider: 'none', + }, + ], + 'jura': ['Jura'], + }, + }), + ], +}) diff --git a/packages/markdown-it-unlazy-img/src/index.ts b/packages/markdown-it-unlazy-img/src/index.ts index c58dd4c1..75013250 100644 --- a/packages/markdown-it-unlazy-img/src/index.ts +++ b/packages/markdown-it-unlazy-img/src/index.ts @@ -8,7 +8,9 @@ import { normalizePath } from 'vite' const defaultMapGlobPatterns = [ '**/.vitepress/cache/@nolebase/vitepress-plugin-thumbnail-hash/thumbhashes/map.json', + '.vitepress/cache/@nolebase/vitepress-plugin-thumbnail-hash/thumbhashes/map.json', '**/thumbhashes/map.json', + 'thumbhashes/map.json', ] export interface ThumbHashAsset {