ppoffice / hexo-theme-icarus

A simple, delicate, and modern theme for the static site generator Hexo.
https://ppoffice.github.io/hexo-theme-icarus/
MIT License
6.28k stars 1.54k forks source link

Comment Plugin is render-blocking #1264

Open LynanBreeze opened 5 months ago

LynanBreeze commented 5 months ago

Bug描述 When comment plugin loads its .js and .css files, widgets on the left would not be shown until comment plugin files are loaded. 当评论插件加载.js.css文件时,左侧的Widgets被阻塞渲染。

系统与环境

themes/icarus/layout/layout.jsx https://github.com/ppoffice/hexo-theme-icarus/blob/master/layout/layout.jsx#L32

<div class={classname({
    column: true,
    'order-2': true,
    'column-main': true,
    'is-12': columnCount === 1,
    'is-8-tablet is-8-desktop is-9-widescreen': columnCount === 2,
    'is-8-tablet is-8-desktop is-6-widescreen': columnCount === 3
})} dangerouslySetInnerHTML={{ __html: body }}></div> // Blocking when loading comment plugin
<Widgets site={site} config={config} helper={helper} page={page} position={'left'} />
<Widgets site={site} config={config} helper={helper} page={page} position={'right'} />

期望行为 Widgets would not be blocked by comment plugin. 左侧Widgets可以在页面打开时正确展示。

截图

image image