Comment Plugin is render-blocking
Author: LynanBreezeCreated Jan 15, 2024Updated Jan 16, 2024
Labelsbug:extension
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可以在页面打开时正确展示。
截图
Source: ppoffice/hexo-theme-icarus