c11929dccb
notebook-ci / build-push-deploy (push) Successful in 47s
- Brand: Hnote / hang's note / title suffix X.H. - Tab icon: circular green X logo - Decorative titles use Nanum Pen + Zhi Mang Xing - Drop sticky sidebars; keep fluid layout
77 lines
1.8 KiB
JavaScript
77 lines
1.8 KiB
JavaScript
// @ts-check
|
|
|
|
import mdx from '@astrojs/mdx';
|
|
import sitemap from '@astrojs/sitemap';
|
|
import { unified } from '@astrojs/markdown-remark';
|
|
import { defineConfig, fontProviders } from 'astro/config';
|
|
import { remarkObsidian } from './src/plugins/remark-obsidian.mjs';
|
|
|
|
// https://astro.build/config
|
|
// Astro 7 默认 Sätteri 不跑 remark 插件;笔记博客需要 [[wikilink]],改用 unified
|
|
export default defineConfig({
|
|
site: 'https://notebook.any.me.uk',
|
|
integrations: [mdx(), sitemap()],
|
|
markdown: {
|
|
processor: unified({
|
|
remarkPlugins: [remarkObsidian],
|
|
shikiConfig: {
|
|
themes: {
|
|
light: 'github-light',
|
|
dark: 'github-dark',
|
|
},
|
|
defaultColor: false,
|
|
},
|
|
}),
|
|
},
|
|
fonts: [
|
|
{
|
|
provider: fontProviders.local(),
|
|
name: 'Atkinson',
|
|
cssVariable: '--font-atkinson',
|
|
fallbacks: [
|
|
'"Segoe UI"',
|
|
'"PingFang SC"',
|
|
'"Hiragino Sans GB"',
|
|
'"Microsoft YaHei"',
|
|
'sans-serif',
|
|
],
|
|
options: {
|
|
variants: [
|
|
{
|
|
src: ['./src/assets/fonts/atkinson-regular.woff'],
|
|
weight: 400,
|
|
style: 'normal',
|
|
display: 'swap',
|
|
},
|
|
{
|
|
src: ['./src/assets/fonts/atkinson-bold.woff'],
|
|
weight: 700,
|
|
style: 'normal',
|
|
display: 'swap',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
/* 特殊标题:拉丁钢笔手写(比 Caveat 更干净好看) */
|
|
{
|
|
provider: fontProviders.google(),
|
|
name: 'Nanum Pen Script',
|
|
cssVariable: '--font-hand-latin',
|
|
weights: [400],
|
|
styles: ['normal'],
|
|
subsets: ['latin'],
|
|
fallbacks: ['"Segoe Print"', 'cursive'],
|
|
},
|
|
/* 特殊标题:中文行书手写(志莽行,飘逸美观) */
|
|
{
|
|
provider: fontProviders.google(),
|
|
name: 'Zhi Mang Xing',
|
|
cssVariable: '--font-hand-zh',
|
|
weights: [400],
|
|
styles: ['normal'],
|
|
subsets: ['chinese-simplified', 'latin'],
|
|
fallbacks: ['"KaiTi"', '"STKaiti"', 'cursive'],
|
|
},
|
|
],
|
|
});
|