GithubHelp home page GithubHelp logo

volantis-x / hexo-theme-volantis Goto Github PK

View Code? Open in Web Editor NEW
2.0K 29.0 591.0 79.84 MB

A Wonderful Theme for Hexo.

Home Page: https://volantis.js.org

License: MIT License

JavaScript 36.19% Stylus 32.07% EJS 31.74%
hexo hexo-theme hexo-blog blog volantis

hexo-theme-volantis's People

Contributors

beiyanyunyi avatar chao-zhi avatar ciraos avatar cofm avatar colsrch avatar crainyday avatar dependabot[bot] avatar drew233 avatar ericclose avatar flexiston avatar github-actions[bot] avatar heson525 avatar hiltay avatar i-abc avatar ic3evi1 avatar inkss avatar lete114 avatar longguzzz avatar meowbot233 avatar mhuig avatar penndu avatar qinxs avatar reqwey avatar shadowrz avatar tikas avatar w4j1e avatar wndbac avatar xaoxuu avatar zhaohaihao avatar zsstrike avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hexo-theme-volantis's Issues

将public目录单独使用会出现js错误

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是指的是哪个文件,直到自己看到了评论才了解。

目录栏定位按钮的问题

经发现,右侧的文章目录右上角的定位按钮在火狐浏览器下点击后,会直接打开新标签页,且在地址栏中显示的内容为“javascript:void(0)”
具体的解决办法是将toc.ejs文件中的target="_blank"去掉即可解决该问题。
可能是xaoxuu在开发widget部分的时候粘贴代码时导致的一个失误。
Uploading 2.gif…

import失败

尝试使用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文件中。

some advice

建议集成文章【字数统计】、【阅读时长】的功能

ie11下面,导航条显示有问题

ie11访问首页,默认响应小屏幕的导航条显示出来了。
虽然ie是要被唾弃的,但是至少页面不要给用户太惊吓。

没有做SEO

没有做SEO这块,渲染的页面没有keywords,希望各位大神有空做一下。

MathJaX适配问题

本来这个issue是因为我原来用的hexo-renderer-markdown-it插件渲染公式失败才提的,结果经过一通实验和升级npm和node版本,原来的问题不见了,在material-x上使用KaTeX的方法反而出了问题,所以还是来报个bug。

详情参见环境和mathjax导入测试源代码。简单来说,就是hexo-renderer-markdown-it-plus和mathjax不适配,出现错位(即使关掉katex插件也是这样,如下图):

image

和katex也不适配,也有轻微错位:

image

不知道是什么原因,升级大法也没用。

但是经我测试,hexo-renderer-markdown-it对mathjax公式渲染支持还不错。

图片放大功能实现

您好。

个人目前基于fancybox插件实现了图片放大功能,只针对文章中的图片进行了选择放大处理(避免了头像、emoji表情、分享链接图片的放大),效果如下图所示,:
image

实现步骤

自定义js

在主题的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);
});

如图所示:
image

引入所需文件

我这里将图片放大所需文件引入标签(包括上述自定义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>

如图所示
image

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脚本一键完成测试。

提问前请先认真阅读文档

文档:https://xaoxuu.com/wiki/material-x/

Google Analytics推送问题

换成这个主题之后,我的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也是注入有问题,我有空用测试博客实验一下(不过访问量可能会有点困难)。

Front-matter中的excerpt字段不起作用

使用中发现excerpt字段失效,不过#27中提到的description字段仍然有效。具体效果:

(更正:上述效果是出现在看首页时,文章实际内容都一样)

文档里只说description是“页面描述”,建议修改一下。

导航栏菜单下方指示条不能灵活跟随

用鼠标在导航栏菜单之间来回指向,下方的指示条不能很灵活的跟随,特别是需要调大菜单间距后鼠标从其他位置移到菜单上,指示条还是依旧停留在上一个菜单位置,只有点击菜单后指示条才显示到点击的菜单下方

Request English Version

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播放器有时无法加载问题解决

您好。

关于Aplayer播放器页面刷新有时无法加载的问题,发现是由异步加载js文件引起。

将主题目录下 layout/_third-party/aplayer.ejs文件中的加载js文件的async属性去除。如图示:
image

即修改成以下即可解决该问题:

<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

能否提供mathjax的支持

替换成大神你的主题

hexo s后提示差最后一步到底是那一步? 加了在博客主目录的 _config.yml 文件中,添加 shortcut_icon 和 favicon还是提示。

关于Readmore的一个小意见

现在文章Readmore打开的时候会像超链接那样在新的页面打开这篇文章,而不是点击标题直接在原页面跳转打开.
作者可以在后面的更新里加上对Readmore的这个设置项吗?

文章TOC目录太长会出现问题

文章目录太长会导致目录卡片覆盖遮住友链卡片
就是比如我在一个markdown文件里有很多二级三级标题,这样TOC卡片的长度就会很长,然后你上下移动的时候因为目录是会跟随着你当前阅读的位置移动的,就遮住了友链的那卡片了

pjax的实现

我已知您原来的pjax版本问题有:

  • toc栏不会更新
  • 评论不会更新
  • mathjax会失效
  • sub header不会更新
  • scrollReveal会失效
  • 进度条只在第一次加载时会有

我重写了您的pjax代码,修复了mathjax、valine评论和sub header的问题。

其余的评论系统由于没使用过,在我自己魔改版主题里被我去掉了,所以没测试。

剩下2个问题是靠关闭来解决的。

进度条的问题不影响使用就没管。

Demo ⚠ 未经过移动端测试

由于我自己的主题已经被我改的面目全非,和原版完全不一样,所以不提pr了。

实现细节可以私聊,联系方式在我博客的“关于"界面里。

Mathjax

之前有发过,最近发现可能还是有一些问题。不知道有没有在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) { %>
  • 然后以后在每一篇文章中就可以在开头使用 description 来为其设置摘要了,比较方便,实例如下:

作者可以考虑添加一下

搜索会忽略根目录

我的站点配置了root,即博客的根目录并非 / ,使用server: hexo搜索服务时点击结果忽略了root的配置从而导致无法正确重定向至文章页面。

暗黑模式下搜索结果的字体颜色和白色混在一起了,看不见

image

如果你发现 无法使用 或者效果与示例有较大区别,可以使用hexo官方提供的用于单元测试的博客应用本主题查看样式是否正常,对比_config.yml文件排查问题。

下载单元测试:

Hexo官方的单元测试博客: https://github.com/hexojs/hexo-theme-unit-test.git
如果你的系统是macOS,则可以使用hexo.sh脚本一键完成测试。

提问前请先认真阅读文档

文档:https://xaoxuu.com/wiki/material-x/

标题中带有空格的话会显示 &amp; ?

如果你发现 无法使用 或者效果与示例有较大区别,可以使用hexo官方提供的用于单元测试的博客应用本主题查看样式是否正常,对比_config.yml文件排查问题。

下载单元测试:

Hexo官方的单元测试博客: https://github.com/hexojs/hexo-theme-unit-test.git
如果你的系统是macOS,则可以使用hexo.sh脚本一键完成测试。

提问前请先认真阅读文档

文档:https://xaoxuu.com/wiki/material-x/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.