翻阅了大部分博客后,选择抄 Velari 的方案。
移除了引述块的默认斜体
代码高亮
public class FastIOTest {
public static void main(String[] args) throws IOException{
//建立流标识器的常用方法
StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
}
}
// ...
import {
transformerNotationDiff,
transformerNotationHighlight,
transformerNotationWordHighlight,
} from "@shikijs/transformers";
export default defineConfig({
// ...
markdown: {
remarkPlugins: [remarkToc, [remarkCollapse, { test: "Table of contents" }]],
shikiConfig: {
// For more themes, visit https://shiki.style/themes
themes: { light: "min-light", dark: "night-owl" },
defaultColor: false,
wrap: false,
transformers: [
transformerFileName(),
transformerNotationHighlight(),
transformerNotationWordHighlight(),
transformerNotationDiff({ matchAlgorithm: "v3" }),
],
},
},
// ...
}
公式渲染
行内 渲染
块级