sharonxy
关注
112131 号成员,2023-08-25 03:52:54 加入
65
个人主页 浏览
5h14m
在线时长
  • daily note 随手写自动引用到相关主题笔记该怎么实现呢

    2025-04-11 16:41

    现在是在用这种方法的,问题就是一天写的东西可能涉及好多个主题,每天 daily note 写完再去主题笔记{{稍嫌麻烦,所以想看有没有其他方法

  • zhang-light 主题标题自动编号

    2025-04-01 16:44

    遇到了相同的问题,添加这段代码可以修改。

    尝试添加在主题的 css 文件里没有生效,可以添加在设置-外观-代码片段里

    /* 整个页面 */ .protyle-wysiwyg, .b3-typography { counter-reset: h1_n 0; /* 一级标题的序号清零 */ } /*-------------------------------编辑页面的标题进行自动编号--------------------------------------------*/ /* 一级标题 */ .protyle-wysiwyg > [data-node-id].h1, .protyle-wysiwyg > [data-node-id][fold="1"].h1, .b3-typography > h1 { counter-increment: h1_n; /* 本级标题序号累加 */ counter-reset: h2_n 0 h3_n 0 h4_n 0 h5_n 0 h6_n 0; /* 后续所有标题序号清零 */ } /* 二级标题 */ .protyle-wysiwyg > [data-node-id].h2, .protyle-wysiwyg > [data-node-id][fold="1"].h2, .b3-typography > h2 { counter-increment: h2_n; counter-reset: h3_n 0 h4_n 0 h5_n 0 h6_n 0; } /* 三级标题 */ .protyle-wysiwyg > [data-node-id].h3, .protyle-wysiwyg > [data-node-id][fold="1"].h3, .b3-typography > h3 { counter-increment: h3_n; counter-reset: h4_n 0 h5_n 0 h6_n 0; } /* 四级标题 */ .protyle-wysiwyg > [data-node-id].h4, .protyle-wysiwyg > [data-node-id][fold="1"].h4, .b3-typography > h4 { counter-increment: h4_n; counter-reset: h5_n 0 h6_n 0; } /* 五级标题 */ .protyle-wysiwyg > [data-node-id].h5, .protyle-wysiwyg > [data-node-id][fold="1"].h5, .b3-typography > h5 { counter-increment: h5_n; counter-reset: h6_n 0; } /* 六级标题 */ .protyle-wysiwyg > [data-node-id].h6, .protyle-wysiwyg > [data-node-id][fold="1"].h6, .b3-typography > h6 { counter-increment: h6_n; } /* 伪元素内容生成 */ .protyle-wysiwyg .h1>::before, .b3-typography h1::before { content: "第"counter(h1_n, cjk-ideographic) "章 "; } .protyle-wysiwyg .h2>::before, .b3-typography h2::before { content: "第"counter(h2_n, cjk-ideographic) "节 "; } .protyle-wysiwyg .h3>::before, .b3-typography h3::before { content: counter(h3_n, cjk-ideographic) "、"; } .protyle-wysiwyg .h4>::before, .b3-typography h4::before { content: "("counter(h4_n, cjk-ideographic) "). "; } .protyle-wysiwyg .h5>::before, .b3-typography h5::before { content: counter(h5_n, decimal) ". "; } .protyle-wysiwyg .h6>::before, .b3-typography h6::before { content: "("counter(h6_n, decimal) "). "; }