volantis-x / hexo-theme-volantis Goto Github PK
View Code? Open in Web Editor NEWA Wonderful Theme for Hexo.
Home Page: https://volantis.js.org
License: MIT License
A Wonderful Theme for Hexo.
Home Page: https://volantis.js.org
License: MIT License
在source/app.js
的第48行
var $headerMenu = $('header .menu');
中多的空格会导致将public目录中的文件单独使用时出错,但是hexo直接部署就不会出现这个问题,具体原因我也不大清楚。
还有请教下header中的active和underline具体是在哪个地方实现的,谢谢!
Uncaught TypeError: Cannot read property 'top' of undefined
at scrolltoElement (app.js:10)
at HTMLAnchorElement.$toc.on (app.js:172)
at HTMLElement.dispatch (jquery.min.js:3)
at HTMLElement.q.handle (jquery.min.js:3)
只有博客页面出现这个错误 其他页面不会
而且博客页面的 TOC功能也失效了,博主提供的demo是可以的,但是我复制过来放在我的项目里就不行,是有和什么插件冲突吗
看了文档,发现如果要从原博客主题迁移过来比较麻烦,主要是原博客主题只要在_config.yml
设置评论系统开启,全部文章都可以有评论系统了,不需要额外在post中增加字段。所以想问问是不是该主题能否开启全局评论,而不需要挨个开启。或者文档哪里我没理解仔细。
ps:建议在文档增加指明_config.yml
的位置,一般其他博客主题都是修改的主题下的_config.yml
,我在使用的时候也不太分得清楚有些地方的_config.yml
是指的是哪个文件,直到自己看到了评论才了解。
当在searchform中键入tab时会从
nav-main container container--flex
自动跳到class为
nav-sub container container--flex
侧边栏widgets 如果放两个,运行hexo s就会报错
尝试使用import功能时失败,配置文件如
# 全局导入
import:
meta:
- "<meta name='theme-color' content='#FFFFFF'>"
- "<meta name='msapplication-TileColor' content='#1BC3FB'>"
- "<meta name='msapplication-config' content='https://cdn.jsdelivr.net/gh/xaoxuu/assets@master/favicon/favicons/browserconfig.xml'>"
link:
- "<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0/katex.min.css'>"
- "<link rel='shortcut icon' type='image/x-icon' href='https://cdn.jsdelivr.net/gh/xaoxuu/assets@master/favicon/favicon.ico'>"
- "<link rel='icon' type='image/x-icon' sizes='32x32' href='https://cdn.jsdelivr.net/gh/xaoxuu/assets@master/favicon/favicons/favicon-32x32.png'>"
- "<link rel='apple-touch-icon' type='image/png' sizes='180x180' href='https://cdn.jsdelivr.net/gh/xaoxuu/assets@master/favicon/favicons/apple-touch-icon.png'>"
- "<link rel='mask-icon' color='#1BC3FB' href='https://cdn.jsdelivr.net/gh/xaoxuu/assets@master/favicon/favicons/safari-pinned-tab.svg'>"
- "<link rel='manifest' href='https://cdn.jsdelivr.net/gh/xaoxuu/assets@master/favicon/favicons/site.webmanifest'>"
时无法加载KaTeX新版本css。检查网页后发现<head>
部分如下:
<!-- meta -->
<meta name="undefined" content="">
<meta name="undefined" content="">
<meta name="undefined" content="">
<!-- link -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/waves.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css">
<link rel="undefined" href=""
>
<link rel="undefined" href=""
>
<link rel="undefined" href=""
>
<link rel="undefined" href=""
>
<link rel="undefined" href=""
>
<link rel="undefined" href=""
>
<link rel="stylesheet" href="/style.css">
感觉import功能好像都失败了。
已经检查过import
位于子目录_config.yml
文件中。
非前端开发,对于自定义有些无力
很喜欢博主开源项目中用到的vue的toc,可惜自己不会添加
能提供渠道吗
建议集成文章【字数统计】、【阅读时长】的功能
效果就像的侧边栏一样,博主有时间的话,希望考虑一下
avatar和motto都可以显示,但是social好像不行啊...
ie11访问首页,默认响应小屏幕的导航条显示出来了。
虽然ie是要被唾弃的,但是至少页面不要给用户太惊吓。
如题,一直失败
没有做SEO这块,渲染的页面没有keywords,希望各位大神有空做一下。
本来这个issue是因为我原来用的hexo-renderer-markdown-it插件渲染公式失败才提的,结果经过一通实验和升级npm和node版本,原来的问题不见了,在material-x上使用KaTeX的方法反而出了问题,所以还是来报个bug。
详情参见环境和mathjax导入测试和源代码。简单来说,就是hexo-renderer-markdown-it-plus和mathjax不适配,出现错位(即使关掉katex插件也是这样,如下图):
和katex也不适配,也有轻微错位:
不知道是什么原因,升级大法也没用。
但是经我测试,hexo-renderer-markdown-it对mathjax公式渲染支持还不错。
您好。
个人目前基于fancybox插件实现了图片放大功能,只针对文章中的图片进行了选择放大处理(避免了头像、emoji表情、分享链接图片的放大),效果如下图所示,:
在主题的js文件目录下创建名为 fancybox-use.js
的文件,内容如下:
// 集成fancybox, 只为文章中所有img元素添加父元素
$(".article-entry").find("img").each(function () {
var element = document.createElement("a");
$(element).attr("data-fancybox", "gallery");
$(element).attr("href", $(this).attr("src"));
$(this).wrap(element);
});
我这里将图片放大所需文件引入标签(包括上述自定义js文件,以及官网demo所需文件)放置主题layout/_partial/scripts.ejs
文件中:
<script src="/js/fancybox-use.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/[email protected]/dist/jquery.fancybox.min.css" />
<script src="https://cdn.jsdelivr.net/gh/fancyapps/[email protected]/dist/jquery.fancybox.min.js"></script>
Pull request已提交,望采纳~
图片懒加载的话一般图片标签内会有个属性名来存放图片的真实地址,比如 data-original
,那么以上代码可以修改为如下代码(这里根据自己定义的属性名进行替换):
// 集成fancybox, 只为文章中所有img元素添加父元素
$(".article-entry").find("img").each(function () {
var element = document.createElement("a");
$(element).attr("data-fancybox", "gallery");
$(element).attr("href", $(this).attr("data-original"));
$(this).wrap(element);
});
如果你发现 无法使用 或者效果与示例有较大区别,可以使用hexo官方提供的用于单元测试的博客应用本主题查看样式是否正常,对比_config.yml文件排查问题。
Hexo官方的单元测试博客: https://github.com/hexojs/hexo-theme-unit-test.git。
如果你的系统是macOS,则可以使用hexo.sh脚本一键完成测试。
换成这个主题之后,我的Google Analytics用户量就骤降了。然而检查网页发现,确实有相关的推送代码。后来我把根目录_config.yml
中的google_analytics_key
去掉,直接在head.ejs
中加入以下推送代码(直接从Google Analytics上拿的全局网站代码)之后就好了:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=my-google-analytics-key"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'my-google-analytics-key');
</script>
如下图,换成material-x主题之后,访问量突然降低为原来的10%左右,加入以上代码之后就好了。
我的用户主要来自搜索,但在搜索结果中的点击次数并没有明显变化(如下图),所以几乎可以确定是网页本身推送的问题。
不知道是之前注入的代码有问题,还是我这边的配置有问题,注入失败了。之前的#46也是注入有问题,我有空用测试博客实验一下(不过访问量可能会有点困难)。
用鼠标在导航栏菜单之间来回指向,下方的指示条不能很灵活的跟随,特别是需要调大菜单间距后鼠标从其他位置移到菜单上,指示条还是依旧停留在上一个菜单位置,只有点击菜单后指示条才显示到点击的菜单下方
I hope if you have more time for develope this themes, please add english version or add option switch between chinse and english. because every this themes update i always change manually some source-code in your themes
thanks
sorry if my english language is bad
您好。
关于Aplayer播放器页面刷新有时无法加载的问题,发现是由异步加载js文件引起。
将主题目录下 layout/_third-party/aplayer.ejs
文件中的加载js文件的async
属性去除。如图示:
即修改成以下即可解决该问题:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/APlayer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/Meting.min.js"></script>
望采纳~
26| <%- feed_tag(config.feed.path, {title: config.title}) %>
27|
28|
29|
Cannot read property 'path' of undefined
at eval (eval at compile (D:\MyBlog\CoolqiBlog\blog\node_modules\ejs\lib\ejs.js:618:12), :44:38)
at returnedFn (D:\MyBlog\CoolqiBlog\blog\node_modules\ejs\lib\ejs.js:653:17)
at Theme._View.View._compiledSync.locals [as _compiledSync] (D:\MyBlog\CoolqiBlog\blog\node_modules\hexo\lib\theme\view.js:120:22)
at Theme._View.View.View.renderSync (D:\MyBlog\CoolqiBlog\blog\node_modules\hexo\lib\theme\view.js:48:23)
at Object.partial (D:\MyBlog\CoolqiBlog\blog\node_modules\hexo\lib\plugins\helper\partial.js:39:15)
at Object.wrapper [as partial] (D:\MyBlog\CoolqiBlog\blog\node_modules\lodash\lodash.js:4935:19)
at eval (eval at compile (D:\MyBlog\CoolqiBlog\blog\node_modules\ejs\lib\ejs.js:618:12), :9:17)
at returnedFn (D:\MyBlog\CoolqiBlog\blog\node_modules\ejs\lib\ejs.js:653:17)
at Theme._View.View._compiled.locals [as _compiled] (D:\MyBlog\CoolqiBlog\blog\node_modules\hexo\lib\theme\view.js:124:48)
at Theme._View.View.View.render (D:\MyBlog\CoolqiBlog\blog\node_modules\hexo\lib\theme\view.js:29:15)
at _compiled.then.result (D:\MyBlog\CoolqiBlog\blog\node_modules\hexo\lib\theme\view.js:40:23)
at tryCatcher (D:\MyBlog\CoolqiBlog\blog\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (D:\MyBlog\CoolqiBlog\blog\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (D:\MyBlog\CoolqiBlog\blog\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (D:\MyBlog\CoolqiBlog\blog\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (D:\MyBlog\CoolqiBlog\blog\node_modules\bluebird\js\release\promise.js:694:18)
at _drainQueueStep (D:\MyBlog\CoolqiBlog\blog\node_modules\bluebird\js\release\async.js:138:12)
at _drainQueue (D:\MyBlog\CoolqiBlog\blog\node_modules\bluebird\js\release\async.js:131:9)
at Async._drainQueues (D:\MyBlog\CoolqiBlog\blog\node_modules\bluebird\js\release\async.js:147:5)
at Immediate.Async.drainQueues (D:\MyBlog\CoolqiBlog\blog\node_modules\bluebird\js\release\async.js:17:14)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
能否提供mathjax的支持
https://mi20.top/article/20190130docker_centos.html 请看此文章,
多了很多的 [object Object] [object Object]
hexo s后提示差最后一步到底是那一步? 加了在博客主目录的 _config.yml 文件中,添加 shortcut_icon 和 favicon还是提示。
实现深色模式和白色模式切换的功能!
谢谢开发者
不过貌似这种静态博客要实现全局BGM很困难。。。
现在文章Readmore打开的时候会像超链接那样在新的页面打开这篇文章,而不是点击标题直接在原页面跳转打开.
作者可以在后面的更新里加上对Readmore的这个设置项吗?
文章目录太长会导致目录卡片覆盖遮住友链卡片
就是比如我在一个markdown文件里有很多二级三级标题,这样TOC卡片的长度就会很长,然后你上下移动的时候因为目录是会跟随着你当前阅读的位置移动的,就遮住了友链的那卡片了
我已知您原来的pjax版本问题有:
我重写了您的pjax代码,修复了mathjax、valine评论和sub header的问题。
其余的评论系统由于没使用过,在我自己魔改版主题里被我去掉了,所以没测试。
剩下2个问题是靠关闭来解决的。
进度条的问题不影响使用就没管。
Demo ⚠ 未经过移动端测试
由于我自己的主题已经被我改的面目全非,和原版完全不一样,所以不提pr了。
实现细节可以私聊,联系方式在我博客的“关于"界面里。
之前有发过,最近发现可能还是有一些问题。不知道有没有在https测试过,可能因为引用的js是外链的原因,能否考虑把这部分js移到本地。
目前主题提供一种在文章正文前面使用 <!--more-->
设置摘要的方式,但是摘要内容其实就是文章正文的前一部分,并不是一个单独的摘要,有时候不满足需求,我尝试了一下,给 post 多添加一个字段 description 来专门设置每一篇文章的摘要,这样摘要和文章正文是独立的,有时候可能会更好一点。具体的实现方式是:
~/layout/_partial/post.ejs
文件中 19,20 行添加一个对 post.description 的判断,代码如下: <%- post.excerpt || post.description || post.content %>
<% if (post.excerpt || post.description) { %>
作者可以考虑添加一下
具体情况是这样的, 坚果云没有把主题的source文件夹同步过来. 所以我的做法是把主题重新git clone了一下, 其他的功能没有问题, 但是文章阅读数却无法显示, 救救孩子QAQ T_T
我的站点配置了root,即博客的根目录并非 / ,使用server: hexo搜索服务时点击结果忽略了root的配置从而导致无法正确重定向至文章页面。
如果你发现 无法使用 或者效果与示例有较大区别,可以使用hexo官方提供的用于单元测试的博客应用本主题查看样式是否正常,对比_config.yml文件排查问题。
Hexo官方的单元测试博客: https://github.com/hexojs/hexo-theme-unit-test.git。
如果你的系统是macOS,则可以使用hexo.sh脚本一键完成测试。
如果你发现 无法使用 或者效果与示例有较大区别,可以使用hexo官方提供的用于单元测试的博客应用本主题查看样式是否正常,对比_config.yml文件排查问题。
Hexo官方的单元测试博客: https://github.com/hexojs/hexo-theme-unit-test.git。
如果你的系统是macOS,则可以使用hexo.sh脚本一键完成测试。
能否增加TOC
跟next主题的toc一样
单美元的行内公式不足以满足部分需求。请求添加双美元行内公式。
Ps:能否添加katex?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.