refactor: remote web font & auto generate title by frontmatter

This commit is contained in:
YunYouJun
2022-05-09 02:18:17 +08:00
parent 6f2383059b
commit ff21c909d1
11 changed files with 404 additions and 300 deletions

View File

@@ -4,15 +4,14 @@ import {
presetIcons,
presetTypography,
presetUno,
presetWebFonts,
// presetWebFonts,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
import { markdownWrapperClasses } from './config'
import { tools } from './src/data/food'
const safelist = markdownWrapperClasses.split(' ')
const safelist: string[] = []
tools.forEach((item) => {
if (item.icon)
@@ -33,16 +32,17 @@ export default defineConfig({
warn: true,
}),
presetTypography(),
presetWebFonts({
fonts: {
serif: [
{
name: 'Noto Serif SC',
weights: [900],
},
],
},
}),
// simplify size
// presetWebFonts({
// fonts: {
// serif: [
// {
// name: 'Noto Serif SC',
// weights: [900],
// },
// ],
// },
// }),
],
transformers: [
transformerDirectives(),