Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.6 版本更新注意事项 #178

Closed
Molunerfinn opened this issue Feb 16, 2019 · 27 comments
Closed

v1.6 版本更新注意事项 #178

Molunerfinn opened this issue Feb 16, 2019 · 27 comments

Comments

@Molunerfinn
Copy link
Owner

Molunerfinn commented Feb 16, 2019

新版文档已经上线!欢迎访问
如果发现访问依然是旧版,请ctrl+f5多刷新几次!
image

一直以来hexo-theme-melody的用户对于平滑升级已经很熟悉,不过本次1.6版本更新带来了一些breaking changes,所以需要大家手动做一些调整,十分抱歉!

其中最显著的就是图标icon的改动。如果你发现升级了版本之后博客的icon显示不全,比如:

image

这是hexo-theme-melody为了兼容font-awesome v5而做出的改动。

事实上如果你依然在使用font-awesome v4版本(hexo-theme-melody默认版本),那么你只需要在你的主题配置文件(通常是melody.yml)里修改social字段:

比如原本social字段如下:

social:
  github: https://github.com/Molunerfinn
  weibo: http://weibo.com/mybluedreams/
  rss: https://molunerfinn.com/atom.xml 

现在你需要在每个字段名后面加上 fa来修复图标显示不全的问题:

social:
  github fa: https://github.com/Molunerfinn
  weibo fa: http://weibo.com/mybluedreams/
  rss fa: https://molunerfinn.com/atom.xml 

如果你想使用font-awesome v5的图标,那么请访问官网挑选你需要的图标。

并在hexo-theme-melody的配置文件里加入font awesome v5的链接,加到原本默认的v4版本链接下面:

image

cdn:
  css:
    fontawesome: https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css
    fontawesomev5: https://use.fontawesome.com/releases/v5.7.2/css/all.css

比如alipay

image

注意到font-awesome v5图标的class命名方式跟v4有所不同,例如上图是fab fa-alipay。对应到hexo-theme-melody的配置文件里,你只需要写alipay fab即可,注意要把prefix也就是fab写到alipay后面。也就是social-icon的命名方式变成name prefix

social:
  github fa: https://github.com/Molunerfinn
  weibo fa: http://weibo.com/mybluedreams/
  rss fa: https://molunerfinn.com/atom.xml
  alipay fab: https://xxx.com

因为破坏性更新给大家带来了不便,十分抱歉!


同时hexo-theme-melody v1.6版本解决了许多bug,加入了许多功能,之后会更新版本说明,也希望大家能够喜欢~

@Molunerfinn
Copy link
Owner Author

另外,由于vuepress从架构上可能更符合我对静态博客的预期,所以之后可能会在hexo-theme-melodyv1.7版本之后进入一个长期维护状态(不再大幅度更新、以修复bug为主),主要精力会投入vuepress-theme-melody的开发,也希望大家能够谅解!

@superman285
Copy link

melody真的非常棒,期待移植到vuepress上,我就也换到vuepress上了,还有我配置_config.yml文件后很多配置项在线上都没有生效,不知道是我配的有问题不,方便提供一份你的或者别人的_config.yml让我参考下吗?感激不尽!

@Molunerfinn
Copy link
Owner Author

@superman285 请问你有没有按照主题的文档说明,迁移一份melody.yml作为你的主题配置文件呢?

@Molunerfinn
Copy link
Owner Author

Molunerfinn commented Feb 22, 2019

@superman285 看不懂英文文档,至少中文文档要看得懂吧:
image
image
请注意是主题目录下的_config.yml不是hexo站点目录下的。
我的配置文件:https://github.com/Molunerfinn/Molunerfinn.github.io/blob/hexo/source/_data/melody.yml
注意看路径。

@superman285
Copy link

superman285 commented Feb 22, 2019 via email

@yxnchen
Copy link

yxnchen commented Apr 19, 2019

你好,换KaTeX引擎一直不成功,希望有更详细教程

@chenweigao
Copy link

您好,想请教一下您怎么样才能自定义 Vuepress 的代码背景呢?
image
bu比如您这样弄成浅色的,我的弄成浅色的会导致白色字体看不清,所以想请问一下您解决方案,谢谢

@Molunerfinn
Copy link
Owner Author

@chenweigao 看VuePress的文档。

hexo-theme-melody的文档的代码配色是自己改写的。

主要用到这两个文件:

https://github.com/Molunerfinn/hexo-theme-melody-doc/blob/master/docs/.vuepress/style.styl
https://github.com/Molunerfinn/hexo-theme-melody-doc/blob/master/docs/.vuepress/override.styl

@chenweigao
Copy link

@Molunerfinn 好的,谢谢~!

@Kiznaiver1998
Copy link

你好,我修改了卜算子的网址后,创建出来的字数总是显示"display:none"是什么原因?感谢

@malongshuai
Copy link

您好,很喜欢您的主题,感谢您的分享。我在使用过程中发现我的代码色没有生效,今天在本地部署测试的时候也是没有颜色。
比如我这一篇里面的:https://www.junmajinlong.com/shell/find_usage/
能指示下是什么问题吗

@xcxcli
Copy link

xcxcli commented Dec 11, 2019

您好,我用的是1.6.1版本,我觉得很漂亮!但是在页面的下方,翻页的图片出了问题。

image

好像是被转义了,怎么解决呢?

@Molunerfinn
Copy link
Owner Author

您好,我用的是1.6.1版本,我觉得很漂亮!但是在页面的下方,翻页的图片出了问题。

image

好像是被转义了,怎么解决呢?

dev分支已经修复这个问题了,可以切换到dev分支使用

@xcxcli
Copy link

xcxcli commented Dec 11, 2019

好的,谢谢您

@1993ycs
Copy link

1993ycs commented Jan 11, 2020

$ git checkout tags/v.1.6.1 error: pathspec 'tags/v.1.6.1' did not match any file(s) known to git

@1993ycs
Copy link

1993ycs commented Jan 11, 2020

初始化很成功。。都是配置着配置着都错了。。

@Molunerfinn
Copy link
Owner Author

Molunerfinn commented Jan 12, 2020

初始化很成功。。都是配置着配置着都错了。。

这里是文档里我写错了。 git checkout v1.6.1 即可。另外你也不必收到切换1.6.1,master分支的代码是1.6.1的。

@1993ycs
Copy link

1993ycs commented Jan 12, 2020

还有 hexo工程下一个配置文件,theme-meldy下面一个配置文件,你建议source下面建一个melody.yml
出现同样的配置melody.yml 会生效 覆盖另外两个配置文件?好像是theme下面的config优先级最高

@1993ycs
Copy link

1993ycs commented Jan 12, 2020

source下面建一个melody.yml 的配置不能生效。不知道为什么

@Molunerfinn
Copy link
Owner Author

source下面建一个melody.yml 的配置不能生效。不知道为什么

注意看文档,是 source/_data/melody.yml

@1993ycs
Copy link

1993ycs commented Jan 12, 2020

我知道是source/_data/melody.yml 啊 也是这么做的。。

@1993ycs
Copy link

1993ycs commented Jan 12, 2020

Cannot read property 'path' of undefined TypeError: D:\blog\blog\themes\melody\layout\includes\config.pug:1 > 1| - 2| var algolia = 'undefined'; 3| var env = process.env; 4| if (theme.algolia_search.enable) { Cannot read property 'path' of undefined at eval (eval at wrap (D:\blog\blog\node_modules\pug-runtime\wrap.js:6:10), :347:25) at template (eval at wrap (D:\blog\blog\node_modules\pug-runtime\wrap.js:6:10), :2864:72) at viewFn._compiled (D:\blog\blog\node_modules\hexo\lib\theme\view.js:136:48) at viewFn.View.render (D:\blog\blog\node_modules\hexo\lib\theme\view.js:41:15) at D:\blog\blog\node_modules\hexo\lib\hexo\index.js:61:21 at tryCatcher (D:\blog\blog\node_modules\bluebird\js\release\util.js:16:23) at D:\blog\blog\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (D:\blog\blog\node_modules\hexo\lib\hexo\router.js:126:3) at RouteStream.Readable.read (stream_readable.js:490:10) at resume (_stream_readable.js:975:12) at processTicksAndRejections (internal/process/task_queues.js:80:21) ERROR D:\blog\blog\themes\melody\layout\includes\config.pug:1 > 1| - 2| var algolia = 'undefined'; 3| var env = process.env; 4| if (theme.algolia_search.enable) {

@Molunerfinn
Copy link
Owner Author

melody.yml请复制主题的_config.yml的内容而不是hexo目录下的_config.yml的内容。这个问题已经在issue里说了不知道多少次了...好好看文档找issue,不是上来就问好不好?

@1993ycs
Copy link

1993ycs commented Jan 12, 2020

melody.yml请复制主题的_config.yml的内容而不是hexo目录下的_config.yml的内容。这个问题已经在issue里说了不知道多少次了...好好看文档找issue,不是上来就问好不好?

弄好了 谢谢
捕获009
这个头图 和文字重叠了 怎么办

@sunyuxianggit
Copy link

你好,我遇到一个错误,在本地更新文章的时候使用hexo s 预览首页文章部分是空白的,用chromeF12 页面审查元素发现东西都在,另一个页面归档是有内容的,hexo d 发布到服务器上是正常的,麻烦帮忙看下,谢谢!!https://sunyuxianggit.github.io

@qianhuiya
Copy link

image
我的搜索框变成了这个样子,怎么回事呀

@fangchenjia
Copy link

这个怎么解决呀
Unhandled rejection TypeError: F:\blog\themes\melody\layout\includes\layout.pug:11
9|
10| - var pageDescription = page.description || page.title || config.description || ''

11| - var pageKeywords = (config.keywords || []).join(',')
12| - if (page.tags && page.tags.data) pageKeywords = page.tags.data.map(function(tag) {return tag.name;}).join(',')
13| - if (page.keywords) pageKeywords = page.keywords.join(',')
14| - var pageAuthor = config.email ? config.author + ',' + config.email : config.author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests