Giter VIP home page Giter VIP logo

hexo-theme-cards's Introduction

Olah! This is ChrAlpha

You have to spare no effort, which can make you seemed like effortless.

  • currently active at Twitter, Mastodon & Telegram Channel
  • ex-OIer, currently learning Bioinfomatics.
  • trying to study front-end on my own by building my own Hexo theme — Cards.
  • know a bit about Python / JavaScript / C++.
  • share something interesting (maybe?) on my blog (zh-CN) in my spare time.
  • GPG key hosted at GitHub as well as Keybase, see Keybase proof.
  • any question, feel free to contact me with Email: hi[at]chralpha[dot]com.
  • support me on 爱发电.

I am under the name of ChrAlpha. But as we know, it is extremely easy to use this ID to impersonate me. Therefore, I do NOT take any responsibility for any actions taken by any other accounts with an ID of “ChrAlpha”, except those accounts verified at Keybase.

hexo-theme-cards's People

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

hexo-theme-cards's Issues

评论无法显示

comment: true
valine我也已经配置好了,就是文章不显示评论功能,只有文字Comments,没有任何输入框和按钮

移动端文章页能取消页边距吗?

但首页的卡片样式还是保留一下比较好看。

现在文章页正文一行顶多21个汉字,换行过于频繁。
应该调整为显示25个汉字更适合阅读吧。

给个开关或者调整的选项?

主颜色配置无效

系统:Windows10 2004
主题版本:在此次issues前的最新commit
问题如下
image
这是我的cards.yml中的样式配置,已设置主颜色
但本地预览测试时发现颜色没有发生变化,望解答

Demo Sites | 示例站点

我们总是迫不及待地想与大家使用「Cards」建立的站点相遇。如果你满足以下要求:

  • 正在使用「Cards」主题
  • 保留 footer 处主题版权信息

那么我们非常欢迎在此 issue 下留下网站名称、地址、头像,我们会酌情将您的链接添加至 Demo 站点友链页面、本主题 README 中以及其他合适的位置。

构建成功后控制台报错:Uncaught TypeError: Cannot read property 'src' of null

我是根据这个进行操作的,此外没干什么。
本地生成静态文件后hexo g--debug页面生成正常。
如图:error2.png
上传到远程仓库后,成功构建后,进入博客页面白屏,打开控制台发现错误:
Uncaught TypeError: Cannot read property 'src' of null。
如图:error.png
bug.log也没发现什么问题,博客在安装theme前也能正常访问。
不知道是什么问题,请指教

languages问题

如图:
image
zh-CN中的footer部分与en相同,建议更改
image
这里的协议地址也不对,写成了en

关于深色模式切换svg的颜色

请问深色模式切换svg的这个颜色是通过哪里修改的。因为我自定义的一些css里面并没有定义svg相关的颜色,但是确实会影响它。

说的不太清楚的话可以看一下这个https://flexiston.com/say/
head中的add-Artitalk-Style是我添加的一些css

1.1.0 文章图片全部显示不出

例如![](https://cdn.jsdelivr.net/gh/forliuyifei/img@mater/img/2020/9/1600623464759.png) 全部转换成了:

<img src="https://cdn.jsdelivr.net/gh/forliuyifei/img@mater/img/2020/9/1600623464759.png" class="lazyload" data-srcset="https://cdn.jsdelivr.net/gh/forliuyifei/img@mater/img/2020/9/1600623464759.png" srcset="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAABlBMVEXMzMyWlpYU2uzLAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAACklEQVQImWNgAAAAAgAB9HFkpgAAAABJRU5ErkJggg==">

后面那一串srcset="data:image/png;base64,xxxxx不知道怎么冒出来的
查看示例

Render HTML Failed

1.0.0版本,之前使用的旧版本可以正常使用,更换到1.0.0版本后报上述错误。
cards\layout\_plugins\highlight\prismjs\source.ejs中的config.highlight.enable !== true改成config.highlight.enable === true后恢复正常

报错是为什么呢(小白求问)

Unhandled rejection TypeError: /Users/huang/MyBlog/themes/cards/layout/layout.ejs:9
7| <%- body %>
8|

9| <%- partial('_partial/scripts') %>
10|
11|
12|

/Users/huang/MyBlog/themes/cards/layout/_partial/scripts.ejs:1

1| <% if (config.lazyload.enable) { %>
2| <script defer crossorigin="anonymous" src="<%- theme.vendors.lazyload || 'https://cdn.jsdelivr.net/npm/[email protected]/dist/lazyload.min.js' %>"></script>
3| <script>
4| window.lazyLoadOptions = {

Cannot read property 'enable' of undefined
at eval (/Users/huang/MyBlog/themes/cards/layout/_partial/scripts.ejs:8:28)
at scripts (/Users/huang/MyBlog/node_modules/ejs/lib/ejs.js:682:17)
at viewFn._compiledSync (/Users/huang/MyBlog/node_modules/hexo/lib/theme/view.js:132:22)
at viewFn.View.renderSync (/Users/huang/MyBlog/node_modules/hexo/lib/theme/view.js:60:23)
at Object.partial (/Users/huang/MyBlog/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
at eval (/Users/huang/MyBlog/themes/cards/layout/layout.ejs:22:17)
at layout (/Users/huang/MyBlog/node_modules/ejs/lib/ejs.js:682:17)
at viewFn._compiled (/Users/huang/MyBlog/node_modules/hexo/lib/theme/view.js:136:48)
at viewFn.View.render (/Users/huang/MyBlog/node_modules/hexo/lib/theme/view.js:41:15)
at /Users/huang/MyBlog/node_modules/hexo/lib/theme/view.js:52:23
at tryCatcher (/Users/huang/MyBlog/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/huang/MyBlog/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/Users/huang/MyBlog/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/Users/huang/MyBlog/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/Users/huang/MyBlog/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/Users/huang/MyBlog/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/Users/huang/MyBlog/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/Users/huang/MyBlog/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/huang/MyBlog/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:456:21)

MathJax 渲染失败

hello
我的文章经常有很多公式,添加了frontmatter:MathJax: true之后渲染出了点问题,有部分公式被渲染,有部分没有同时有很大错位。我对网页技术不是很了解。请问可能是什么问题?

https://robinzyb.github.io/2020/05/24/hf_python/
5月23号git clone的版本还是没有问题的,渲染是正常的。

valine表情配置推荐使用json编码代替字符串拼接

发现现在valine表情配置使用的是字符串拼接,这样遇到路径中存在双引号会报错,推荐使用json编码

emojiMaps: {
    <% for (let key in theme.comments.valine.emojiMaps) { %>
    <%- key + ': \"' + theme.comments.valine.emojiMaps[key] + '\",' %>
    <% } %>
}

改为

emojiMaps: <%- JSON.stringify(theme.comments.valine.emojiMaps)%>;

另外,推荐将整个valine配置项json编码,这样以后valine有更新配置项的时候就不需要再修改模板了

<% if (theme.comments.valine.enable) { %>
    <% if (theme.cdn.enable && theme.cdn.js.valine) { %>
        <%- js(theme.cdn.js.valine) %>
    <% } else { %>
        <%- js('https://cdn.jsdelivr.net/npm/valine@latest/dist/Valine.min.js') %>
    <% } %>
    <script>
        var valineConifg = <%- JSON.stringify(theme.comments.valine)%>;
        valineConifg.el = '#valine_container';
        new Valine(valineConifg);
    </script>
<% } %>

更新后valine自定义表情功能依旧无法使用

$ hexo cl && hexo d
INFO Deleted database.
INFO Deleted public folder.
INFO Start processing
ERROR Process failed: _posts/Windows仿MacUI.md
YAMLException: duplicated mapping key at line 17, column -11:
categories:
^
at generateError (G:\blog\node_modules\js-yaml\lib\js-yaml\loader.js:167:10)
at throwError (G:\blog\node_modules\js-yaml\lib\js-yaml\loader.js:173:9)
at storeMappingPair (G:\blog\node_modules\js-yaml\lib\js-yaml\loader.js:335:7)
at readBlockMapping (G:\blog\node_modules\js-yaml\lib\js-yaml\loader.js:1098:9)
at composeNode (G:\blog\node_modules\js-yaml\lib\js-yaml\loader.js:1359:12)
at readDocument (G:\blog\node_modules\js-yaml\lib\js-yaml\loader.js:1519:3)
at loadDocuments (G:\blog\node_modules\js-yaml\lib\js-yaml\loader.js:1575:5)
at Object.load (G:\blog\node_modules\js-yaml\lib\js-yaml\loader.js:1596:19)
at parseYAML (G:\blog\node_modules\hexo-front-matter\lib\front_matter.js:80:21)
at parse (G:\blog\node_modules\hexo-front-matter\lib\front_matter.js:56:12)
at G:\blog\node_modules\hexo\lib\plugins\processor\post.js:48:20
at tryCatcher (G:\blog\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (G:\blog\node_modules\bluebird\js\release\promise.js:544:35)
at Promise._settlePromise (G:\blog\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (G:\blog\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (G:\blog\node_modules\bluebird\js\release\promise.js:729:18)
at Promise._fulfill (G:\blog\node_modules\bluebird\js\release\promise.js:673:18)
at PromiseArray._resolve (G:\blog\node_modules\bluebird\js\release\promise_array.js:127:19)
at PromiseArray._promiseFulfilled (G:\blog\node_modules\bluebird\js\release\promise_array.js:145:14)
at PromiseArray._iterate (G:\blog\node_modules\bluebird\js\release\promise_array.js:115:31)
at PromiseArray.init [as _init] (G:\blog\node_modules\bluebird\js\release\promise_array.js:79:10)
at Promise._settlePromise (G:\blog\node_modules\bluebird\js\release\promise.js:601:21)

报错信息如上
image
更新后添加了自定义表情,没有实现效果
貌似连valine自身都无法显示了

楼主的博客上导航栏与现有主题的发行版本不同

你好,楼主的博客上导航栏(实白色)与现有主题的发行版本(1.0.0)不同。请问是自定义的,还是该版本还未发布。
为此,建议在主题的footer上可以显示发行版本号,或在构建完毕后在其他地方体现博客主题版本。

主题如何使用自定义字体文件?

如题,

  1. 是在markdown.styl文件(path: themes/cards/layout/source/css/markdown.styl)里改吗?
    (尝试加了几个字体,貌似没用)

  2. 引入的字体文件放在哪里?

希望能给个说明,谢谢!

文章图片展示上的小缺陷

当文章的 thumbnail 宽高不够时,会留下空白,如下图:
1
3
我个人在 layout.styl 中添加了如下代码:

.post-card__header
    img 
        width 100%

.post__header
    img 
        width 100%

当然,位图会因此失真,不过当图像宽高只差一点点时或使用 SVG 图像时是完美的。
2
4

关于评论懒加载

请问现在评论懒加载是还没有推到 master 吗?看你博客有了,但是主题没看到相关配置。

thumbnail字段问题

cards主题升级到1.1.0版本后,‘thumbnail’字段为true无法在主页看到缩略图显示,是我的lazyload配置不对么?
我的thumbnail配置:

# 文章缩略图
  thumbnail: 
    enable: true
    default:   # 默认缩略图,当页面 `thumbnail` 字段为空时 fallback 至此参数

lazyload配置:

# 图片懒加载插件
lazyload:
  enable: true
  onlypost: false
  loadingImage: 

hexo --version:

  • hexo: 5.2.0
  • hexo-cli: 3.1.0
  • os: Windows_NT 10.0.18363 win32 x64

修改配置项

image
官网指出,1.4.0+已废弃这两个配置项
主题配置文件中应该取消这两个配置吧

导航栏内文字不居中

image
image

如图,hover后的阴影能看出文字不在阴影中间。
测试环境:macOS 10.15.7 下的 Safari 14.0 和 Chrome 85.0

更新主题后valine无法使用

如下图:
image
image
经过推测,发现了一个bug,如下图:
image
在这里加入了一个defer,貌似加入后就无法加载评论了
我尝试去掉“defer”,经测试,成功使用。

首页logo能加个圆框和阴影吗?

image
经测试应该是72x72的图片尺寸最合适, 我不知道怎么在css里针对这个头像的img进行指定样式, 修改 .cover .cover_logo没反应。
有交流群吗请问?

主题导致站点关键词重复

我只在站点根目录配置文件添加了keywords,结果生成

<meta name="keywords" content="undefined, Loafing-around,INFP,Movies,Books,Hexo-theme-Cards,RSS订阅Loafing-around,INFP,Movies,Books,Hexo-theme-Cards,RSS订阅">

开头多了个undefined ,后边还把关键词重复了一遍

文章目录显示错误

我使用的主题:最新的master分支。

如图:
image
不知道为什么,在过多目录的文章中,会出现显示错误的bug,望修复,谢谢!

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.