Comments (9)
我在你的博客确实复现了bug,但是在我的博客中没有复现bug,我观察到你的图片放大后没有相应的右上角关闭按钮,
请贴出你的配置文件js版本,检查是否和以下版本一致,hexo版本是否为7.0.0,主题版本是否为^1.9.6
anchor: https://lib.baomitu.com/anchor-js/4.3.1/
github_markdown: https://lib.baomitu.com/github-markdown-css/4.0.0/
jquery: https://lib.baomitu.com/jquery/3.6.4/
bootstrap: https://lib.baomitu.com/twitter-bootstrap/4.6.1/
prismjs: https://lib.baomitu.com/prism/1.29.0/
tocbot: https://lib.baomitu.com/tocbot/4.20.1/
typed: https://lib.baomitu.com/typed.js/2.0.12/
fancybox: https://lib.baomitu.com/fancybox/3.5.7/
nprogress: https://lib.baomitu.com/nprogress/0.2.0/
mathjax: https://lib.baomitu.com/mathjax/3.2.2/
katex: https://lib.baomitu.com/KaTeX/0.16.2/
busuanzi: https://busuanzi.ibruce.info/busuanzi/2.3/
clipboard: https://lib.baomitu.com/clipboard.js/2.0.11/
mermaid: https://lib.baomitu.com/mermaid/8.14.0/
valine: https://lib.baomitu.com/valine/1.5.1/
waline: https://cdn.staticfile.org/waline/2.15.5/
gitalk: https://lib.baomitu.com/gitalk/1.8.0/
disqusjs: https://lib.baomitu.com/disqusjs/1.3.0/
twikoo: https://lib.baomitu.com/twikoo/1.6.8/
discuss: https://lib.baomitu.com/discuss/1.2.1/
hint: https://lib.baomitu.com/hint.css/2.7.0/
from hexo-theme-fluid.
from hexo-theme-fluid.
在我的环境复现不出来,可以先检查下你的环境
from hexo-theme-fluid.
通过对配置文件的js版本的逐行注释与刷新测试,最终定位到问题在fancybox
;
我是这样操作的,我把所有用到的js和css等都下载了下来放在了static目录下,然后配置如下:完整配置文件点这里查看
static_prefix:
# 内部静态
# Internal static
internal_js: /js
internal_css: /css
internal_img: /img
# anchor: https://lib.baomitu.com/anchor-js/4.3.1/
anchor: /assets/static/
# github_markdown: https://lib.baomitu.com/github-markdown-css/4.0.0/
github_markdown: /assets/static/
# jquery: https://lib.baomitu.com/jquery/3.6.4/
jquery: /assets/static/
# bootstrap: https://lib.baomitu.com/twitter-bootstrap/4.6.1/
bootstrap: /assets/static/
# prismjs: https://lib.baomitu.com/prism/1.27.0/
prismjs: /assets/static/
# tocbot: https://lib.baomitu.com/tocbot/4.18.2/
tocbot: /assets/static/
# typed: https://lib.baomitu.com/typed.js/2.0.12/
typed: /assets/static/
# fancybox: https://lib.baomitu.com/fancybox/3.5.7/
fancybox: /assets/static/
# # nprogress: https://lib.baomitu.com/nprogress/0.2.0/
nprogress: /assets/static/
# # mathjax: https://lib.baomitu.com/mathjax/3.2.1/
mathjax: /assets/static/
# katex: https://lib.baomitu.com/KaTeX/0.15.6/
katex: /assets/static/
# busuanzi: https://busuanzi.ibruce.info/busuanzi/2.3/
busuanzi: /assets/static/
# clipboard: https://lib.baomitu.com/clipboard.js/2.0.10/
clipboard: /assets/static/
# mermaid: https://lib.baomitu.com/mermaid/8.14.0/
mermaid: /assets/static/
# valine: https://lib.baomitu.com/valine/1.4.18/
valine: /assets/static/
# waline: https://lib.baomitu.com/waline/2.5.1/
waline: /assets/static/
# gitalk: https://lib.baomitu.com/gitalk/1.7.2/
gitalk: /assets/static/
# disqusjs: https://lib.baomitu.com/disqusjs/1.3.0/
disqusjs: /assets/static/
# twikoo: https://lib.baomitu.com/twikoo/1.5.11/
twikoo: /assets/static/
# hint: https://lib.baomitu.com/hint.css/2.7.0/
hint: /assets/static/
这样可以确保即使lib.baomitu.com挂掉了也不会影响我的博客(我之前遇到过导致博客样式全乱了,详见这里);
但是别的css或者js都没问题,只有fancybox
出现了问题,如果我把fancybox:
改为https://lib.baomitu.com/fancybox/3.5.7/
则没问题,怀疑是因为fancybox
的文件名为jquery.
开头有关,我不太懂相关知识,希望能得到解惑。这不是一个所有人都会遇到的问题,你们也可以选择忽略它。
再次感谢你们开源了如此优秀的项目
from hexo-theme-fluid.
@dr34-m
从我测试来看,似乎是你 fancybox js 内容有问题(可能不是一个版本)
可以从 https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js 重新 copy 一份试试
from hexo-theme-fluid.
@zkqiang
经过对比确认,我的fancybox js文件与 https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js
相同,只是换行符存在差异,我还是重新copy并测试了,问题依然存在。我的博客源码在这里
from hexo-theme-fluid.
对比js
https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js
https://blog.ctftools.com/assets/static/jquery.fancybox.min.js
证明1
baomitu上的jquery.fancybox.min.js的哈希值 | (text/javascript) - 68253bytes
-- | --
MD5 | 49a6b4d019a934bcf83f0c397eba82d8
SHA1 | 6181412e73966696d08e1e5b1243a572d0f22ba6
SHA256 | cadda460ccb4c3c01bb45f3d5976f63f5adf8dc3ff1d31cb4fbd3ded4f18e5bf
你博客上的jquery.fancybox1.min.js的哈希值| (text/javascript) - 67978bytes
-- | --
MD5 | db75378df9db13cc70f770b779acc2be
SHA1 | 037622011ee3dc20e770997c22fa7192f828cdd4
SHA256 | 0a6b43955c8112f2fe3b110a46dc2fe4ba9512ab79d81e09dd182be08c950036
上面的哈希值不一致证明你和官方指定版本的js是不一致的
证明二
官方的js文件可以搜索到两个{{SHARE}}
你的js文件搜不到{{SHARE}}
结论
事实证明你没有copy成功,请下载指定版本js后可以解决此问题
from hexo-theme-fluid.
@xiyuvi 这太离谱了,我确实发现https://blog.ctftools.com/assets/static/jquery.fancybox.min.js文件有问题
但是我的源码是没问题的https://github.com/dr34-m/hexo/blob/master/source/assets/static/jquery.fancybox.min.js
我只能怀疑,是不是hexo编译的时候,把js里边的大括号{{}}给干掉了
from hexo-theme-fluid.
非常抱歉给你们带来了麻烦,我通过在_config.yml
添加skip_render: assets/static/*
解决了这个问题
from hexo-theme-fluid.
Related Issues (20)
- done:如何修改首页的大图,以及博客的图标
- 将首页头图高度设置为0时(`banner_img_height: 0`),顶栏和文章列表异常
- 永远加载不完的进度条 HOT 2
- 关于valine评论系统 HOT 1
- 侧边栏无法显示同标签文章 HOT 1
- 自定义页面使用已有的布局
- VSCode插件-方便自動貼上snippet(Hexo Snippet Paste Tool for Fluid v1.0.0釋出) HOT 1
- 在开启代理的情况下前端页面无法正常加载 HOT 2
- 如何使勾选框的 text 部分支持 markdown
- Giscus 评论区背景加载失败 HOT 3
- banner_img设置不生效,我在_config.fluid.yml设置的banner_img不被加载,看前端加载的还是default.png
- 删除/替换淘宝镜像相关依赖包 HOT 2
- 文章在首页的缩略图可不可以在全局配置啊? HOT 1
- 分类页面的banner_img是怎么配置的? HOT 1
- 怎么使用gitee的评论系统啊? HOT 2
- 关于文章页面点击目录后,点击后推键不会退出这个页面而是会跳回上一个目录
- 关于点击目录后回退问题
- 折疊塊內部的行內程式碼區塊不會跳脫
- 如何设置评论插件的 path?
- Bug:代码块高光修改后只在localhost生效,对远程部署的网页不生效 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hexo-theme-fluid.