Skip to content

Commit

Permalink
将汉字的斜体改成斜体以增进体验 (#10)
Browse files Browse the repository at this point in the history
* 目标:中文斜体改楷体

* Update chinese-italic.ts

* Update index.ts

* Update chinese-italic.ts
  • Loading branch information
ArenaDruid authored Feb 4, 2025
1 parent f436402 commit e286c33
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions quartz.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const config: QuartzConfig = {
// *caption text*
// ```
Plugin.FigureCaptions(),
Plugin.ChineseItalic(),
// Adds image lightbox support
//Plugin.Lightbox(),
],
Expand Down
16 changes: 16 additions & 0 deletions quartz/plugins/transformers/chinese-italic.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { QuartzTransformerPlugin } from "../types"

interface Options {
// 可扩展选项(如自定义字体名)
}

export const ChineseItalic: QuartzTransformerPlugin<Options> = (opts) => {
return {
name: "ChineseItalic",
externalResources() {
return {
css: [{ content: "attachments/chinese-italic-kaiti.css" }],
}
},
}
}
1 change: 1 addition & 0 deletions quartz/plugins/transformers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ export { HardLineBreaks } from "./linebreaks"
export { RoamFlavoredMarkdown } from "./roam"
export { FigureCaptions } from "./figcaptions"
export { Lightbox } from "./lightbox"
export { ChineseItalic } from "./chinese-italic"

0 comments on commit e286c33

Please sign in to comment.