Replies: 1 comment 1 reply
-
通过插件注入后可以直接通过全局变量 After injecting through the plug-in, you can directly use the global variable |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug | 问题描述
hexo-next主题,使用@waline/hexo-next包引入评论/浏览量统计功能时,会引入valine的js包
按照官网教程,引入最近评论挂件时(例如在
_data/side-bar.njk
中引入),需要引入另一个valine的js包两个包的内容并不完全一致,会下载两次。
但体积都在60KiB左右,是否有可能将其指向同一个cdn资源,仅下载一次?
简单地将2个url统一成其中任意一个都会导致报错。
Website URL | 问题网站
无
Where your waline deploy? | 服务部署在哪里?
Vercel (Default)
Where your comment data store? | 数据存储在哪里?
LeanCloud(https://leancloud.app)
Describe the bug | Problem description
hexo-next theme, when using the @waline/hexo-next package to introduce the comment/view statistics function, valine's js package will be introduced
According to the official website tutorial, when introducing the recent comment widget (for example, introducing it in
_data/side-bar.njk
), you need to introduce another valine js packageThe contents of the two packages are not exactly the same and will be downloaded twice.
But the sizes are all around 60KiB. Is it possible to point them to the same CDN resource and download it only once?
Simply unifying the two URLs into either one will result in an error.
Website URL | Problem website
none
Where your waline deploy? | Where is the service deployed?
Vercel (Default)
Where your comment data store? | Where is the data stored?
LeanCloud(https://leancloud.app)
Beta Was this translation helpful? Give feedback.
All reactions