hexo-theme-shokax 0.2.0-rc3 → 0.2.0-rc4

Sign up to get free protection for your applications and to get access to all the features.
package/_config.yml CHANGED
@@ -28,6 +28,8 @@ experiments:
28
28
  debug: false # 使用debug模式启动
29
29
  disableThemeComment: false # 禁用主题评论系统(一般用于关闭评论或让插件接管评论系统)
30
30
  usingRelative: false # _image.yml 使用相对路径
31
+ optimizeLongPosts: false # 优化长文章,这能让长文章的FPS提升70%-150%并解决假死问题,但存在一些副作用
32
+ # 具体见https://docs.kaitaku.xyz/guide/theme.html#%E9%95%BF%E6%96%87%E7%AB%A0%E4%BC%98%E5%8C%96
31
33
 
32
34
  # 优化性能区
33
35
  performance:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-shokax",
3
- "version": "0.2.0-rc3",
3
+ "version": "0.2.0-rc4",
4
4
  "description": "a hexo theme based on shoka",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/zkz098/hexo-theme-shokaX",
@@ -13,21 +13,12 @@
13
13
  img,
14
14
  .tabs,
15
15
  .links {
16
- content-visibility: auto;
17
- contain-intrinsic-size: 979px 1.1em;
18
16
  &:last-child {
19
17
  margin-bottom: 0;
20
18
  }
21
19
  }
22
20
 
23
- span {
24
- content-visibility: auto;
25
- contain-intrinsic-size: 979px 1.1em;
26
- }
27
-
28
21
  ul, dd, ol {
29
- content-visibility: auto;
30
- contain-intrinsic-size: 979px 3.5em;
31
22
  ul, ol {
32
23
  margin-top: 0;
33
24
  }
@@ -33,4 +33,6 @@ if $custom = hexo-config('style.custom')
33
33
  for $inject_style in hexo-config('injects.style')
34
34
  @import $inject_style;
35
35
 
36
+ if $optimize = hexo-config('experiments.optimizeLongPosts')
37
+ @import "optimize.styl"
36
38
 
@@ -0,0 +1,6 @@
1
+ .md {
2
+ span:not(.katex), p, pre, li, a {
3
+ content-visibility: auto;
4
+ contain-intrinsic-size: auto 1em;
5
+ }
6
+ }