是猫。
candinya / kratos-rebirth Goto Github PK
View Code? Open in Web Editor NEW一只可爱的hexo主题 m(=•ェ•=)m~🍭
Home Page: https://kr-demo.candinya.com/posts/Kratos-Rebirth-Manual/
License: GNU General Public License v3.0
一只可爱的hexo主题 m(=•ェ•=)m~🍭
Home Page: https://kr-demo.candinya.com/posts/Kratos-Rebirth-Manual/
License: GNU General Public License v3.0
是猫。
您的新功能建议是由使用时出现的不便引发的吗?
关于折叠插件,未能在使用指南中找到 [快捷实现 [默认全部展开] 的功能],且根据查阅到的资料实现较为困难,需要插件封装并实现 [对应功能的配置项]。
请描述您所设想的功能或是解决方案
方案一. 简单地实现所描述的功能,并在文档的相应章节更新最新的示例代码。
方案一. 完善文档的示例代码。
在列表标题超过2行的时候 内容简介过多会导致样式错位
2. 复现Bug的方法:
新增文档,将内容标题书写过长 超过2行
此时简介区内容过多的时候会出现样式错位
3. 期望的行为:
修复建议:
对代码中 kratos-entry-header-new样式名增加新的样式
.kratos-entry-header-new{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
mac os 11.4
chrome 最新版
sfair 14.1.1
任何系统下都会出现这个问题
6. 补充内容:
无
Hello~,我从1.4.3更新到1.4.4后,配置好valine,然后文章配置comments=true,本地启动hexo后爆下面的错误。
将comments设置为false后能正常进去文章的页面。
请问需要怎么解决?
Unhandled rejection Error: /Users/path/to/blog/themes/KratosRebirth/layout/post.ejs:83
81| <% } %>
82| <% if (theme.posts.comments && page.comments && page.title && !page.link) { %>
>> 83| <%- partial('_comments/' + theme.posts.comments) %>
84| <% } %>
85| </article>
86| </section>
Partial _comments/vanila does not exist. (in post.ejs)
at Object.partial (/Users/path/to/blog/node_modules/hexo/lib/plugins/helper/partial.js:16:11)
at eval (/Users/path/to/blog/themes/KratosRebirth/layout/post.ejs:156:17)
at post (/Users/path/to/blog/node_modules/ejs/lib/ejs.js:682:17)
at _View._compiled (/Users/path/to/blog/node_modules/hexo/lib/theme/view.js:136:50)
at _View.render (/Users/path/to/blog/node_modules/hexo/lib/theme/view.js:39:17)
at /Users/path/to/blog/node_modules/hexo/lib/hexo/index.js:64:21
at tryCatcher (/Users/path/to/blog/node_modules/bluebird/js/release/util.js:16:23)
at /Users/path/to/blog/node_modules/bluebird/js/release/method.js:15:34
at RouteStream._read (/Users/path/to/blog/node_modules/hexo/lib/hexo/router.js:47:5)
at RouteStream.Readable.read (_stream_readable.js:469:10)
at resume_ (_stream_readable.js:956:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
由于最近一些功能的开发写得比较仓促,我只是将我看见的模块的配色进行了修改,原来的样式表文件里并没有仔细处理过,所以可能还会存在一些相关的细节Bug(如部分页面的模块配色、一些细节的颜色变化等)等待解决。包括新加入的搜索功能,由于各方面也都还在测试,所以一定会存在不少瑕疵与漏洞。如果您在最新版本上有发现任何功能上的问题,并且确认了在本站复现的话,您可以在这里回复,协助我们一起解决。
您的新功能建议是由使用时出现的不便引发的吗?
はい
请描述您所设想的功能或是解决方案
hexo-filter-mermaid-diagrams
next主题文档
补充内容:
(与本isuue无关)比较好奇MathJax那块支持后再去除的原因,是冲突还是啥的
看了下演示和博客都没看到
expireNotify
函数,这是不必要的复现Bug的方法:
1 前往一篇带有文章过期提醒的详情页面;
2 点击导航栏上的任意菜单;
3 点击浏览器 go back 按钮,返回查看之前打开的文章历史记录网页;
4 文章过期提醒框重复添加。
这是 pjax 引起的问题。
期望的行为:
不会重复添加文章过期提示框;在非文章详情页面不执行 expireNotify
函数。
<% if (theme.expire.enable) { %>
<% const diffDays = moment(new Date()).diff(moment(page.updated), 'day');
const expireDay = theme.expire.day;
%>
<% if (expireDay!=0 && diffDays > expireDay) { %>
<div class="alert alert-warning" role="alert">
本文最后编辑于 <%= diffDays %> 天前,其中的内容可能需要更新。
</div>
<% } %>
<% } %>
在 ejs 中实现如上所示,需要在 _config.yml
中新增:
expire:
enable: true
day: 30
是否可以 PR ~
对Bug的描述:
在主题文件夹中使用npm install 安装相关npm modules 时,npm audit审计报出依赖中有较多漏洞。
复现Bug的方法:
可以使用如下的方案进行复现:
在最新版本的主题文件夹下使用npm install 报出依赖有漏洞。
期望的行为:
正常安装安全依赖
运行环境(如果该Bug的产生和环境有关,例如浏览器不兼容导致):
操作系统:Win10 wsl2 (Ubuntu 20.04)
浏览器:Chrome 91.0.4472.124
Nodejs:16.4.2
npm:7.19.1
补充内容:
在使用npm audit fix 之后,依旧存在此问题。
PS: 找到使用ncu自动更新npm module后漏洞数量减少
对Bug的描述:
window.requestIdleCallback
及window.cancelIdleCallback
API 在 Safari 浏览器上不支持,导致文章底部评论框加载失败
复现Bug的方法:
在 Safari (iOS/iPadOS/macOS) 浏览器上访问开启评论留言的页面时,因 Safari 浏览器上不支持/未开启window.requestIdleCallback
及window.cancelIdleCallback
API,导致评论功能加载失败。
期望的行为:
能在 Safari 浏览器上正常使用各种评论插件显示评论。
相关的截图:
see: https://developer.mozilla.org/zh-CN/docs/Web/API/Window/requestIdleCallback
运行环境(如果该Bug的产生和环境有关,例如浏览器不兼容导致):
window.requestIdleCallback
及window.cancelIdleCallback
API 在 Safari 浏览器上不支持
补充内容:
可以用 setTimeout() 重构 window.requestIdleCallback
及window.cancelIdleCallback
API 来解决 Safari 上的兼容问题,我将发起 PR : )
see: https://developer.mozilla.org/zh-CN/docs/Web/API/Background_Tasks_API
否
2. 请描述您所设想的功能或是解决方案
在首页为每篇文章添加阅读次数,可以放在日期和tag之后,阅读全文之前。这样方便在首页查看每篇文章的热度。
3. 补充内容:
也可以添加评论次数,甚至可以把右侧边栏的最新文章改为最热文章排名。
对Bug的描述:
Status(无标题文章)使用了不同的年份,如果全都为特殊年份的部分置顶,会导致归档页面出现一个没有内容的空年份,可能需要重写年份判断机制
复现Bug的方法:
如上所述
期望的行为:
删掉归档页面中关于status的统计(年份+计数)
相关的截图:
能支持valine吗?valine真的很好,而且我想在markdown生成的html中,head自动加上谷歌等使用站长资源要加的那个,还有谷歌百度一些统计访问人数的东西
对Bug的描述:
该Bug导致无法正常渲染页面等等。
复现Bug的方法:
部分报错
ERROR Theme config load failed.
ERROR {
err: YAMLException: bad indentation of a mapping entry (159:86)
156 | ...
157 | ...
158 | ...
159 | ... description: "好伙伴们在哪里~"
------------------------------------------^
160 | ...
161 | ... - name: "Talk"
我的修改
# Friends 友链相关内容
friends:
href: "friends"
page:
title: "好伙伴们"
comments: false description: "好伙伴们在哪里~"
updated: "2021-01-18"
list: - name: "Talk"
bio: "Talk"
avatar: "../images/avatar.webp"
link: "http://ghome.byethost10.com/" verify: true # 验证 每个友链的可访问性,炸了会有提示
Hello~
我在配置文件中设置valine.visitor=true
,设置好了app_id
和app_key
。按照网上的例子在LeanCloud上创建了一个名为Counter的Class,但是每次刷新文章页面,文章的阅读次数一只都是0,我开启了评论功能,评论功能生效了,说明LeanCloud应该是能正常使用的,请问要使阅读量统计生效还要做什么配置吗?
我没有在文档里看到主题
theme文件
git clonehttps://github.com/Candinya/Kratos-Rebirth/ theme
类似这段的代码
请问要怎么安装这个主题呢
...我之前见过和这个一样的非HEXO主题...看起来好像是单页面应用...当时很感兴趣..
但,我用的HEXO嘛,就没有去研究那个..
这个我看了下似乎也是单页面应用这种模式的,点击以后不是跳转而是一个XHR请求....
看起来是后端路由?在HEXO的框架下..这个是通过什么手段实现的呢?
总不至于是前端发起GET请求然后处理获得的HTML页面吧...
如果是这样....恩..拦截普通的URL跳转...发起GET请求,页面整体替换/部分替换..毛病倒是没有....
share.ejs 中 excerpt 摘要模板字符串( `...` )与颜文字 (┓( ´∀` )┏ ) 冲突,导致语法错误:Uncaught SyntaxError: Unexpected token ')',即模板字符串提前识别完成,后续字符串无法识别为模板字符串。分享功能也无法正常使用。
Kratos-Rebirth/layout/_tools/share.ejs
Lines 47 to 65 in 7d9274e
分享功能正常使用(很少用到qwq)
慎用颜文字!!!
你好~非常喜欢你的主题&感谢你的无私分享!!
有个小问题,我将siderbar设置为none,但是内容并没有居中,请问有什么办法可以解决这个问题吗0.0
经测试发现,若没有在文章.md文件中设置 <!-- more -->
首页的文章概要,在访问该文章时,会导致share.ejs 分享插件出错。
Unhandled rejection ReferenceError: D:\HEXO\themes\Kratos-Rebirth\layout\post.ejs:32
30| <% if (theme.posts.share) { %>
31| <a class="Share" href="javascript:;"><i class="fa fa-share-alt"></i> 分享</a>
>> 32| <%- partial('_partial/share', {page: page}) %>
33| <% } %>
34| </div>
35| <% } %>
D:\HEXO\themes\Kratos-Rebirth\layout\_partial\share.ejs:44
42| var host_url="<%- page.permalink %>";
43| var title="【<%- page.title %>】";
>> 44| var excerpt="<% if (page.excerpt){ %><%= strip_html(page.excerpt) %><% } else { %><%- strip_html(truncate(post.content, 45)) %><% } %>";
45| var _URL;
46| if(obj=="qq"){
47| _URL=qqShareURL+"url="+host_url+"&title="+title+"&desc=&summary="+excerpt+"&site=cxpy";
对Bug的描述:
奇怪的渲染
可能冲突的环境:
插件:"hexo-prism-plugin": "^2.3.0"
部分根目录配置:
highlight:
enable: false
line_number: false
auto_detect: false
tab_replace: ''
wrap: true
hljs: false
prismjs:
enable: true
preprocess: true
line_number: false
tab_replace: ''
prism_plugin:
mode: 'preprocess'
theme: 'default'
line_number: true # default false
custom_css: 'path/to/your/custom.css' # optional
复现过程:
1.任意创造一个页面,写入多个较长的代码块
排查过程:
1,hexo-admin直接在线预览确认代码块是否写法正确
2,换用官方landspace主题
在咱的主题中配置文件里面没有发现toc的开启,我看着咱最近发的说明也没找到
clone了这个主题后, 设置好了菜单,添加文章后,不能正常启用valine的评论功能。
看了一下博主的源码,没有找到问题所在。valine的appkey已经替换成了自己的,请求博主支援拉
生成的网址是http://example.com/2021/05/18/%E7%AC%AC%E4%B8%80%E7%AF%87%E5%8D%9A%E5%AE%A2/
前面主站网址怎么改正成自己的网址
对Bug的描述:
在Hexo的生命周期中,主题代码注入与配置读取是同步进行的;本主题虽然目前使用的是processAfter
并且没有使用once限制来暴力注入以提升可靠性,但这种方式(尤其是一些比较消耗资源的操作)无疑会导致严重拖累Hexo的性能。目前我们还在研究相关的解决方案,单纯使用once单次调用并不可靠(很有可能导致构建爆炸),使用ready事件则直接爆炸(好像没有被调用?)
复现Bug的方法:
暂无
期望的行为:
正确构建,并且支持将配置文件迁移到站点文件夹下
运行环境(如果该Bug的产生和环境有关,例如浏览器不兼容导致):
Github CI:构建成功
CloudFlare Pages:构建失败
补充内容:
https://github.com/hexojs/hexo/blob/92b979f4a3fa8714aebd3d11c3295d466b870905/lib/hexo/index.js#L239-L248
侧边栏隐藏的时候,手机端会给右侧留下空栏左右滑动😂但是手机横过来就没问题
抱歉再三叨扰(o-ωq)).oO 真的辛苦了
对Bug的描述:
config中微博设置问题
复现Bug的方法:
https://weibo.com/u/real_greenhandzdl
https://m.weibo.cn/u/real_greenhandzdl?&jumpfrom=weibocom
https://m.weibo.cn/u/6570808175?uid=6570808175&t=0&luicode=10000011&lfid=100103type%3D1%26q%3Dreal_greenhandzdl
当前主题的顶部导航栏应该有两种判断:
/archives/
/friends/
https://candinya.com
如果在里面加入 RSS 地址,例如 /atom.xml
,那么也会在本页面打开。
但是在这个页面中,可能由于没有使用到主题,因此这个页面的返回键异常,点击返回无法返回之前的页面。
可以使用如下的方案进行复现:
...
# Top Menu 顶部导航栏配置 (具体格式请参照文档)
menu:
index: /atom.xml
...
https://[url]//atom.xml
期望的行为:
正常返回,或者跳出?
运行环境(如果该Bug的产生和环境有关,例如浏览器不兼容导致):
就像你的站点那样,该怎么设置呢?谢谢!
是不是404页面还不支持啊?我访问自己的404页面只能后面加入/404进入。
首先感谢作者提供的主题,在万千主题中最钟爱这一款!!!
之前用的是v1.6.3版本,感觉非常流畅,但是更新到v1.6.5版本后,在文章页面点击某个目录项会延迟一会才滑动过去
是不是新版本新添加的呀,体验感略差了耶(呜~
您的新功能建议是由使用时出现的不便引发的吗?
想要给站点博文 拓展 自定义的随机图标,结果发现 随机图标有数量限制(最多20张图片).
我想要放上100张美图
请描述您所设想的功能或是解决方案
## 随机头图的数量
thumbnail:
random_amount: 19
补充内容:
您的新功能建议是由使用时出现的不便引发的吗?
是。
请描述您所设想的功能或是解决方案
分类页面下单独置顶,并且可以指定使用status作为置顶内容。
可以在每一种分类下各设置一个置顶的文章做一个简介帖(如果是status单独置顶就更好了),而且这些置顶的文章不会出现在首页。
补充内容:
(来源于博客评论,跟进于GitHub)
ERROR {
err: TypeError: E:\LonelyZhou_Bolg\themes\Kratos-Rebirth\layout\layout.ejs:1
1| <%- partial('_partial/head') %>
2| <%- partial('_partial/header') %>
3|
4| <%- body %>
E:\LonelyZhou_Bolg\themes\Kratos-Rebirth\layout_partial\head.ejs:45
43|
44|
45| <% if (theme.contact.twitter) { %>
46|
47|
48|
Cannot read property 'twitter' of undefined
at eval (E:\LonelyZhou_Bolg\themes\Kratos-Rebirth\layout_partial\head.ejs:115:26)
at head (E:\LonelyZhou_Bolg\node_modules\ejs\lib\ejs.js:682:17)
at _View._compiledSync (E:\LonelyZhou_Bolg\node_modules\hexo\lib\theme\view.js:132:24)
at _View.renderSync (E:\LonelyZhou_Bolg\node_modules\hexo\lib\theme\view.js:59:25)
at Object.partial (E:\LonelyZhou_Bolg\node_modules\hexo\lib\plugins\helper\partial.js:34:15)
at eval (E:\LonelyZhou_Bolg\themes\Kratos-Rebirth\layout\layout.ejs:10:17)
at layout (E:\LonelyZhou_Bolg\node_modules\ejs\lib\ejs.js:682:17)
at _View._compiled (E:\LonelyZhou_Bolg\node_modules\hexo\lib\theme\view.js:136:50)
at _View.render (E:\LonelyZhou_Bolg\node_modules\hexo\lib\theme\view.js:39:17)
at E:\LonelyZhou_Bolg\node_modules\hexo\lib\theme\view.js:51:25
at tryCatcher (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\promise.js:729:18)
at _drainQueueStep (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\async.js:15:14)
at processImmediate (internal/timers.js:439:21) {
path: 'E:\LonelyZhou_Bolg\themes\Kratos-Rebirth\layout\layout.ejs'
}
} Render HTML failed: index.html
Unhandled rejection TypeError: E:\LonelyZhou_Bolg\themes\Kratos-Rebirth\layout\layout.ejs:1
1| <%- partial('_partial/head') %>
2| <%- partial('_partial/header') %>
3|
4| <%- body %>
E:\LonelyZhou_Bolg\themes\Kratos-Rebirth\layout_partial\head.ejs:45
43|
44|
45| <% if (theme.contact.twitter) { %>
46|
47|
48|
Cannot read property 'twitter' of undefined
at eval (E:\LonelyZhou_Bolg\themes\Kratos-Rebirth\layout_partial\head.ejs:115:26)
at head (E:\LonelyZhou_Bolg\node_modules\ejs\lib\ejs.js:682:17)
at _View._compiledSync (E:\LonelyZhou_Bolg\node_modules\hexo\lib\theme\view.js:132:24)
at _View.renderSync (E:\LonelyZhou_Bolg\node_modules\hexo\lib\theme\view.js:59:25)
at Object.partial (E:\LonelyZhou_Bolg\node_modules\hexo\lib\plugins\helper\partial.js:34:15)
at eval (E:\LonelyZhou_Bolg\themes\Kratos-Rebirth\layout\layout.ejs:10:17)
at layout (E:\LonelyZhou_Bolg\node_modules\ejs\lib\ejs.js:682:17)
at _View._compiled (E:\LonelyZhou_Bolg\node_modules\hexo\lib\theme\view.js:136:50)
at _View.render (E:\LonelyZhou_Bolg\node_modules\hexo\lib\theme\view.js:39:17)
at E:\LonelyZhou_Bolg\node_modules\hexo\lib\theme\view.js:51:25
at tryCatcher (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\promise.js:729:18)
at _drainQueueStep (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (E:\LonelyZhou_Bolg\node_modules\bluebird\js\release\async.js:15:14)
at processImmediate (internal/timers.js:439:21)
我对scss内容还不了解,我看到了src/scss/highlight.scss里面有相关的代码,但是修改后没有效果,虽然修改source/css/highlight.min.css里面的代码可以看效果,但是如何去对应,代码高亮主题的五种选择呢?(normal | night | night eighties | night blue | night bright)
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.