mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 23:04:05 -06:00
将插件形式改为自定义scss直接合并入index.css
This commit is contained in:
parent
5c62251be2
commit
c187ff39d3
@ -77,9 +77,7 @@ const config: QuartzConfig = {
|
||||
// Adds image caption support. Syntax:
|
||||
Plugin.FigureCaptions(),
|
||||
// 启动中文斜体转楷体插件
|
||||
Plugin.ChineseItalic(),
|
||||
// Adds image lightbox support
|
||||
//Plugin.Lightbox(),
|
||||
//Plugin.ChineseItalic(),
|
||||
],
|
||||
filters: [
|
||||
//Plugin.RemoveDrafts(),
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
import { QuartzTransformerPlugin } from "../types"
|
||||
|
||||
interface Options {
|
||||
// 可扩展选项(如自定义字体名)
|
||||
}
|
||||
|
||||
export const ChineseItalic: QuartzTransformerPlugin<Options> = (opts) => {
|
||||
return {
|
||||
name: "ChineseItalic",
|
||||
externalResources() {
|
||||
return {
|
||||
css: [{ content: "static/chinese-italic-kaiti.css" }],
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -12,4 +12,3 @@ export { TableOfContents } from "./toc"
|
||||
export { HardLineBreaks } from "./linebreaks"
|
||||
export { RoamFlavoredMarkdown } from "./roam"
|
||||
export { FigureCaptions } from "./figcaptions"
|
||||
export { ChineseItalic } from "./chinese-italic"
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
/* Copyright (c) 2025 Github@ArenaDruid | MIT License */
|
||||
/* 定义中文斜体专用字体 */
|
||||
@font-face {
|
||||
font-family: 'ChineseItalic';
|
||||
font-style: italic;
|
||||
src: local('楷体'),
|
||||
local('Kaiti SC'),
|
||||
local('STKaiti');
|
||||
unicode-range: U+4E00-9FFF; /* 中文字符范围 */
|
||||
}
|
||||
|
||||
/* 智能应用规则 */
|
||||
em, .cm-em, i {
|
||||
font-family:
|
||||
-apple-system, /* 西文字体栈 */
|
||||
BlinkMacSystemFont,
|
||||
'Segoe UI',
|
||||
Roboto,
|
||||
'ChineseItalic', /* 中文斜体触发 */
|
||||
sans-serif;
|
||||
|
||||
font-style: italic; /* 必须保持斜体状态 */
|
||||
}
|
||||
@ -1,3 +1,23 @@
|
||||
@use "./base.scss";
|
||||
|
||||
// put your custom CSS here!
|
||||
// put your custom CSS here!
|
||||
|
||||
/* Copyright (c) 2025 Github@ArenaDruid | MIT License */
|
||||
/* 定义中文斜体专用字体 */
|
||||
@font-face {
|
||||
font-family: 'ChineseItalic';
|
||||
font-style: italic;
|
||||
src: local('楷体'),
|
||||
local('Kaiti SC'),
|
||||
local('STKaiti');
|
||||
unicode-range: U+4E00-9FFF; /* 中文字符范围 */
|
||||
}
|
||||
|
||||
/* 智能应用规则 */
|
||||
em, .cm-em, i {
|
||||
font-family:
|
||||
'ChineseItalic', /* 中文斜体触发 */
|
||||
var(--bodyFont);
|
||||
|
||||
font-style: italic; /* 必须保持斜体状态 */
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user