Coder Social home page Coder Social logo

molunerfinn / hexo-theme-melody Goto Github PK

View Code? Open in Web Editor NEW
1.6K 23.0 211.0 782 KB

:musical_keyboard:A simple & beautiful & fast theme for Hexo.

Home Page: https://molunerfinn.com

License: Other

JavaScript 24.19% Pug 37.11% Stylus 38.69%
hexo hexo-theme

hexo-theme-melody's Introduction

hexo-theme-melody

JavaScript Style Guide license hexo-image

A simple & beautiful & fast theme for Hexo.

See demo:

and more...

If you are using theme-melody and want to be shown to others like above (It will be stopped when the demo sites' number up to 25), please write down your site in this issue!

Documentation

Documentation is here. Now it supports en and zh-Hans.

If you meet problems using hexo-theme-melody, it's recommended to read FAQ & Documentation, most of your problems will be solved!

Changelogs

See releases.

Screenshots

Installation

Notice: The installation method before and after hexo 5.0 version is different.

Hexo version < 5.0

Find your hexo work folder

git clone -b master https://github.com/Molunerfinn/hexo-theme-melody themes/melody

If you don't have jade & stylus renderer, follow this:

npm install hexo-renderer-pug hexo-renderer-stylus

In your hexo site's _config.yml, find the theme field, change it to melody:

theme: melody

Hexo version >= 5.0

npm install hexo-theme-melody

If you don't have jade & stylus renderer, follow this:

npm install hexo-renderer-pug hexo-renderer-stylus

In your hexo site's _config.yml, find the theme field, change it to melody:

Configuration

Notice: The configuration file before and after hexo 5.0 version is different.

Hexo version < 5.0

For smoothly updating theme-melody, I recommend to create a config file named melody.yml in your hexo work folder's (Notice: not the theme-melody folder) source/_data folder(If it doesn't exist, create one)

Copy the contents of _config.yml to melody.yml. Now you can configure it by yourself and you can update theme-melody smoothly.

Hexo version >= 5.0

  1. create a _config.melody.yml in your hexo work folder.
  2. copy the contents of ./node_modules/hexo-theme-melody/_config.yml to _config.melody.yml
  3. If you have used hexo-theme-melody for a long time, and has a melody.yml above, please copy the contents of melody.yml to _config.melody.yml & remove melody.yml since it will be deprecated.

Now you can configure it by yourself and you can update theme-melody smoothly.

Update

Notice: The update method before and after hexo 5.0 version is different.

Hexo version < 5.0

Jump into the melody folder, just git pull is OK.

Hexo version >= 5.0

In your hexo work folder, just npm update hexo-theme-melody is OK.

For more details, please check documentation

Browser Support

IE >= 10

TODOS

  • Doc
  • Search // Algolia support
  • Analysis // Baidu & Google analytics support
  • MathJax // MathJax support
  • i18n // zh-Hans & en support
  • PWA // v1.2 support
  • Performance optimization
  • ...

License

MIT

Copyright (c) 2017 Molunerfinn

hexo-theme-melody's People

Contributors

0xflotus avatar ayuusweetfish avatar beezen avatar esunr avatar evolution404 avatar flier268 avatar folgerjun avatar fridolph avatar fzp avatar hanwgeek avatar imamelie avatar jerryc127 avatar kiyo5hi avatar molunerfinn avatar myl7 avatar s094392 avatar sheey11 avatar sunhailin-leo avatar test-lin avatar upupming avatar warmqing avatar yugepower avatar yunyoujun avatar zhangyantju avatar zhullyb avatar zouyaoji 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

hexo-theme-melody's Issues

addThis dosen't work

我配置好了addThis,但没看到分享的任何图标被显示,hexo server也没有报任何错误,请问怎么处理?

你好请教一下algolia搜索的问题

在我开启 algolia 功能之后,在 hexo 的根目录的 _config.yml 文件里添加如下内容
algolia:
applicationID: 'id'
apiKey: 'key'
apiAdmin: 'key'
indexName: 'index'
chunkSize: 5000
fields:

  • title
  • path
    已经确认ID 和 KEY值都是没有问题的,index名称也没有问题,抛出如下报错
    /hexo/annda/node_modules/bluebird/js/release/async.js:61
    fn = function () { throw arg; };
    ^
    AlgoliaSearchError: Please provide an application ID. Usage: algoliasearch(applicationID, apiKey, opts)
    at AlgoliaSearchNodeJS.AlgoliaSearchCore (/hexo/annda/node_modules/hexo-algoliasearch/node_modules/algoliasearch/src/AlgoliaSearchCore.js:51:11)
    at AlgoliaSearchNodeJS.AlgoliaSearch (/hexo/annda/node_modules/hexo-algoliasearch/node_modules/algoliasearch/src/AlgoliaSearch.js:11:21)
    at AlgoliaSearchNodeJS.AlgoliaSearchServer (/hexo/annda/node_modules/hexo-algoliasearch/node_modules/algoliasearch/src/server/builds/AlgoliaSearchServer.js:17:17)
    at new AlgoliaSearchNodeJS (/hexo/annda/node_modules/hexo-algoliasearch/node_modules/algoliasearch/src/server/builds/node.js:79:23)
    at algoliasearch (/hexo/annda/node_modules/hexo-algoliasearch/node_modules/algoliasearch/src/server/builds/node.js:68:10)
    at /hexo/annda/node_modules/hexo-algoliasearch/lib/algolia.js:124:18
    at tryCatcher (/hexo/annda/node_modules/bluebird/js/release/util.js:16:23)
    at Promise.successAdapter [as _fulfillmentHandler0] (/hexo/annda/node_modules/bluebird/js/release/nodeify.js:22:30)
    at Promise._settlePromise (/hexo/annda/node_modules/bluebird/js/release/promise.js:566:21)
    at Promise._settlePromise0 (/hexo/annda/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/hexo/annda/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/hexo/annda/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/hexo/annda/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/hexo/annda/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)

麻烦帮忙定位一下原因,是不是配置还是没有配置正确?谢谢。

Long post preview problem

I want to create a new issue

Melody Information

Melody Version: 1.5.1

Platform: Ubuntu 17.10

Browser: Chrome

Expected behavior && Actual behavior

I have a long post here. When I run

$ hexo s

The page is blank(I tested on both chrome and firefox):
screenshot from 2018-04-05 18-24-12

There is no error/warning in the chrome console. After I run hexo g; hexo d, the page is ok on github pages:
screenshot from 2018-04-05 18-29-23

After I made the post shorter, it can be previewed(hexo s) as normal:
screenshot from 2018-04-05 18-36-25

Personal option

I think this is a bug of melody, since I didn't encounter this kind of thing when I use the default landscape theme.
screenshot from 2018-04-05 18-39-13

However, I am new to hexo and frontend, perhaps I leave out some nodejs packages? This is my package.json file:

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "3.7.0"
  },
  "dependencies": {
    "hexo": "^3.2.0",
    "hexo-algoliasearch": "^0.3.0",
    "hexo-browsersync": "^0.3.0",
    "hexo-deployer-git": "^0.3.1",
    "hexo-generator-archive": "^0.1.4",
    "hexo-generator-category": "^0.1.3",
    "hexo-generator-feed": "^1.2.2",
    "hexo-generator-index": "^0.2.0",
    "hexo-generator-sitemap": "^1.2.0",
    "hexo-generator-tag": "^0.2.0",
    "hexo-offline": "^0.2.3",
    "hexo-render-pug": "^2.0.0",
    "hexo-renderer-ejs": "^0.3.0",
    "hexo-renderer-jade": "^0.4.1",
    "hexo-renderer-marked": "^0.3.0",
    "hexo-renderer-stylus": "^0.3.3",
    "hexo-server": "^0.2.2",
    "hexo-wordcount": "^3.0.2"
  }
}

@Molunerfinn Thank you for your fast reply, I learnt a lot from you.!:kissing:

Best wishes!

Language configuration does not take effect

I want to create a new issue

Melody Information

Melody Version: master 1.5.2 and dev 1.5.2

Platform: Windows

Browser: Chrome

Expected behavior

Change language to Chinese

# html lang
# ---------------
language: zh-Hans

Actual behavior

Language configuration does not take effect


My solution is to rename the language file zh-Hans.yml to default.yml, This method can solve the problem, but it is not perfect

Steps to reproduce the behavior

Feature Request


TODO List

  1. Reveal.js or any other iframes show
  2. Photo gallery
  3. And so on...

What else features do you want ? Welcome to discuss in this issue~

小问题

npm install hexo-jade-renderer hexo-stylus-renderer

包名应该是hexo-renderer-jade hexo-renderer-stylus 吧

不存在前两个名字的包

开启 mathjax 后报错如下,不过到时可以正常显示公式。

⇒ hexo s --debug
08:25:15.811 DEBUG Hexo version: 3.4.2
08:25:15.813 DEBUG Working directory: /Library/Mobile Documents/comappleCloudDocs/blog/
08:25:15.953 DEBUG Config loaded: /Library/Mobile Documents/comapple
CloudDocs/blog/_config.yml
08:25:15.976 DEBUG Plugin loaded: hexo-generator-archive
08:25:15.982 DEBUG Plugin loaded: hexo-deployer-git
08:25:15.984 DEBUG Plugin loaded: hexo-algoliasearch
08:25:15.987 DEBUG Plugin loaded: hexo-generator-category
08:25:15.989 DEBUG Plugin loaded: hexo-generator-tag
08:25:15.991 DEBUG Plugin loaded: hexo-generator-index
08:25:16.001 DEBUG Plugin loaded: hexo-generator-search
08:25:16.341 DEBUG Plugin loaded: hexo-inject
08:25:16.349 DEBUG Plugin loaded: hexo-jupyter-notebook
08:25:16.404 INFO [hexo-math] Using engine 'mathjax'
08:25:16.405 DEBUG Plugin loaded: hexo-math
08:25:16.411 DEBUG Plugin loaded: hexo-renderer-ejs
08:25:16.856 DEBUG Plugin loaded: hexo-renderer-jade
08:25:16.900 DEBUG Plugin loaded: hexo-renderer-stylus
08:25:16.903 DEBUG Plugin loaded: hexo-renderer-markdown-it
08:25:16.970 DEBUG Plugin loaded: hexo-wordcount
08:25:17.065 DEBUG Plugin loaded: hexo-server
08:25:17.069 DEBUG Script loaded: themes/melody/scripts/hexo-plugins.txt
08:25:17.069 DEBUG Script loaded: themes/melody/scripts/replace-config.js
08:25:17.070 DEBUG [hexo-inject] firing inject_ready
Unhandled rejection TypeError: Invalid attempt to destructure non-iterable instance
at /Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/hexo-inject/lib/util.js:7:585
at parse (/Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/hexo-inject/lib/util.js:32:34)
at Array.map ()
at callsite (/Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/hexo-inject/lib/util.js:52:4)
at Inject.require (/Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/hexo-inject/lib/mixin/require.js:100:55)
at Object.require (/Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/hexo-inject/lib/inject.js:65:21)
at Inject._injectMathJax (/Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/hexo-math/lib/filter/inject.js:43:22)
at Hexo.tryCatcher (/Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/bluebird/js/release/util.js:16:23)
at Hexo. (/Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/bluebird/js/release/method.js:15:34)
at /Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/hexo/lib/extend/filter.js:68:35
at tryCatcher (/Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/bluebird/js/release/util.js:16:23)
at Object.gotValue (/Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/bluebird/js/release/reduce.js:155:18)
at Object.gotAccum (/Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/bluebird/js/release/reduce.js:144:25)
at Object.tryCatcher (/Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromiseCtx (/Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/bluebird/js/release/promise.js:606:10)
at Async._drainQueue (/Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/bluebird/js/release/async.js:138:12)
at Async._drainQueues (/Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/Users/wente/Library/Mobile Documents/comappleCloudDocs/blog/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)

08:25:17.080 DEBUG Loading database.

Hexo g 编译报错 layout.pug:11

I want to create a new issue

Melody Information

**Melody Version:1.5.2

**Platform:Windows

**Browser:Chrome

Expected behavior

使用Hexo g 进行编译渲染

Actual behavior

报错

ERROR D:\githubio\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| - var pageAuthor = config.author + ',' + config.email
    14| - var pageCopyright = config.copyright || config.author

(config.keywords || []).join is not a function
TypeError: D:\githubio\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| - var pageAuthor = config.author + ',' + config.email
    14| - var pageCopyright = config.copyright || config.author

(config.keywords || []).join is not a function
    at eval (eval at wrap (D:\githubio\node_modules\pug-runtime\wrap.js:6:10), <anonymous>:20:44)
    at template (eval at wrap (D:\githubio\node_modules\pug-runtime\wrap.js:6:10), <anonymous>:1001:72)
    at Theme._View.View._compiled (D:\githubio\node_modules\hexo\lib\theme\view.js:127:30)
    at Theme._View.View.View.render (D:\githubio\node_modules\hexo\lib\theme\view.js:29:15)
    at D:\githubio\node_modules\hexo\lib\hexo\index.js:390:29
    at tryCatcher (D:\githubio\node_modules\bluebird\js\release\util.js:16:23)
    at D:\githubio\node_modules\bluebird\js\release\method.js:15:34
    at RouteStream._read (D:\githubio\node_modules\hexo\lib\hexo\router.js:134:3)
    at RouteStream.Readable.read (_stream_readable.js:442:10)
    at resume_ (_stream_readable.js:822:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

自己编辑配置文件还是直接使用主题默认配置文件均此错误

Steps to reproduce the behavior

Feature Request


AlgoliaSearchError

您好,不好意思,打扰请教一个问题。
我更新了一篇文章,推送的时候编译不通过,提示AlgoliaSearchError,我在Algolia日志查到这个。
{
"message": "Record at the position 0 objectID=cje9eh9ey0004bz5myy2x96is is too big size=13816 bytes. Contact us if you need an extended quota",
"position": 0,
"objectID": "cje9eh9ey0004bz5myy2x96is",
"status": 400
}

不知道这个是具体说我内容、还是标题什么的太长了?

一些问题

I want to create a new issue

Melody Information

Melody Version:

最新的

Platform:

Windows

Chrome:

Expected behavior

感谢您美丽的主题,
我的搜索引擎algolia比较奇怪,输入什么都没有反应
以及如果我想在如图的地方设置分类和标签,您能教我改一下吗?
以及在上面怎么设置描述,即主页面中标题下面的文字描述。如果方便,能索要你的qq吗

Actual behavior

这里有张图片,就是上图
http://blog.csdn.net/fengyingjie2/article/details/79595625

Steps to reproduce the behavior

Feature Request


给star了

Cannot Jump to the target page when click the slide's link

I want to create a new issue

Melody Information

Melody Version: 1.5.0

Platform: win7 x64

Browser: Chrome 65.0

Expected behavior

Jump to the target page when click the link in homepage slides' overview.

Actual behavior

snipaste_20180318_184215

Steps to reproduce the behavior

--

Feature Request


首页无法渲染

使用npm install hexo-renderer-jade hexo-renderer-stylus --save安装插件时,一直报以下错误
Jade has been renamed to pug, please install the latest version of pug instead of jade

并且在点击文章标题时,无法显示文章页,报错
\themes\melody\layout\post.pug:32
30| .post-meta-wordcount
31| span= _p('post.wordcount') + ': '

32| span.word-count= wordcount(page.content)
33| span.post-meta__separator |
34| span= _p('post.min2read', min2read(page.content, {cn: 350, en: 160}))
35| else
wordcount is not a function

关于表格的问题

无法用markdown语法写表格,然后使用html之后会出现一条很长的空白。
我是这么写的

命令 官方描述 我的描述
hexo g 部署之前预先生成静态文件 在本地保存之前更改的文件配置
hexo d 文件生成后立即部署网站 把现在已保存的配置文件部署到Github仓库里面
hexo s 启动服务器 使用服务器预览本地的已被保存的文件

Version 1.5 Features

Thanks for many developers' help, after version 1.4, theme-melody have fixed many bugs and have some new features.

For the version 1.5, I want to add some new features to it. The followings are my plans, maybe you have some ideas, welcome to discuss with me!

  • Reveal.js or any other (iframes) show for you to show your ideas
  • Photo gallery for you to display your pictures
  • And so on ...

Thank you for choosing the theme-melody, I will make it more beautiful & powerful

Version 1.4 Features

Thanks for many developers' help, after version 1.3, theme-melody have fixed many bugs and have some new features.

For the version 1.4, I want to add some new features to it. The followings are my plans, maybe you have some ideas, welcome to discuss with me!

Thank you for choosing the theme-melody, I will make it more beautiful & powerful

A simple question

Hi,
It's a nice theme!
how to display the tag and category like this on your website
tim 20180323140038

关于修改一些大小

我觉得top-img的高度太大,怎么能调小?
右上角home等字体太小,怎么能调整?
谢谢

highlight_theme: default

I want to create a new issue

Melody Information

Melody Version: 1.5.1

Platform: Ubuntu 17.10

Browser: Chrome Version 65.0.3325.181 (Official Build) (64-bit)

Expected behavior & Actual behavior

文档中 Theme Config部分highlight: defaultmelody.yml中变为了highlight_theme: default

是否应该修改一下文档?

关于分类的问题

如何进行子分类,在你的主题配置文章中没有找到相关提示,谢谢

第2页后,slider iframe地址错误

已找到了具体原因

出错的页面 https://fridolph.github.io/page/2/

Melody Information

Melody Version: 1.5.2

Platform: all

Browser: all

Expected behavior

希望能正常加载数据

Actual behavior

Steps to reproduce the behavior

出现原因

mixin slideIframe(url)
  .content
    iframe(src=url frameborder="0")

mixin postSlideIframe(url)  
  .post-iframe
    iframe(src=url frameborder="0")

首页path是 /2018/4/13/文章名

当到了第2页,url 路径会带上 /page/2 这样的前缀 -> 导致 加载的地址变成了上图 带上了page的url
当翻到后面几页时,去掉page的就好了


pug里 不知怎么改这个逻辑 我考虑的是写个正则

let url = 'http://fridolph.wang/page/2/2018/4/03/你的名字.html'
if(url.match(/\/page\/\d+/g)) {
  url.replace(/(\/page\/\d+)/g, '')
  // url = 'http://fridolph.wang/2018/4/03/你的名字.html'
}

Feature Request

很喜欢这个主题,一直关注着,希望melody会更好~


对于标题前的图标自定义

I want to create a new issue

Melody Information

Melody Version: v1.5.0

Platform: Windows

Browser: Chrome

Feature Request

我想要修改标题前的图标
tim 20180317125728
有个想法:
一级标题前 一个图标
二级标题前 又是另外一个图标
最好能自定义

参照官方配置,进行到复制_config.yml到_data目录的melody.yml后编译出错

Unhandled rejection TypeError: /Users/michael/Desktop/blog/themes/melody/layout/includes/layout.pug:31
29| each url in theme.stylesheets
30| link(rel='stylesheet', href=url)

31| each item in theme.cdn.css
32| if item !== undefined
33| link(rel='stylesheet', href=item + '?version=' + theme.version)
34| include ./head.pug

Cannot read property 'css' of undefined
at eval (eval at wrap (/Users/michael/Desktop/blog/node_modules/pug-runtime/wrap.js:6:10), :80:25)
at eval (eval at wrap (/Users/michael/Desktop/blog/node_modules/pug-runtime/wrap.js:6:10), :102:4)
at template (eval at wrap (/Users/michael/Desktop/blog/node_modules/pug-runtime/wrap.js:6:10), :1037:72)
at Theme._View.View._compiled (/Users/michael/Desktop/blog/node_modules/hexo/lib/theme/view.js:127:30)
at Theme._View.View.View.render (/Users/michael/Desktop/blog/node_modules/hexo/lib/theme/view.js:29:15)
at /Users/michael/Desktop/blog/node_modules/hexo/lib/hexo/index.js:390:25
at tryCatcher (/Users/michael/Desktop/blog/node_modules/bluebird/js/release/util.js:16:23)
at /Users/michael/Desktop/blog/node_modules/bluebird/js/release/method.js:15:34
at RouteStream._read (/Users/michael/Desktop/blog/node_modules/hexo/lib/hexo/router.js:134:3)
at RouteStream.Readable.read (stream_readable.js:442:10)
at resume
(_stream_readable.js:822:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

Unhandled rejection TypeError: /Users/michael/Desktop/blog/themes/melody/layout/includes/layout.pug:31
29| each url in theme.stylesheets
30| link(rel='stylesheet', href=url)

31| each item in theme.cdn.css
32| if item !== undefined
33| link(rel='stylesheet', href=item + '?version=' + theme.version)
34| include ./head.pug

Cannot read property 'css' of undefined
at eval (eval at wrap (/Users/michael/Desktop/blog/node_modules/pug-runtime/wrap.js:6:10), :80:25)
at eval (eval at wrap (/Users/michael/Desktop/blog/node_modules/pug-runtime/wrap.js:6:10), :102:4)
at template (eval at wrap (/Users/michael/Desktop/blog/node_modules/pug-runtime/wrap.js:6:10), :1037:72)
at Theme._View.View._compiled (/Users/michael/Desktop/blog/node_modules/hexo/lib/theme/view.js:127:30)
at Theme._View.View.View.render (/Users/michael/Desktop/blog/node_modules/hexo/lib/theme/view.js:29:15)
at /Users/michael/Desktop/blog/node_modules/hexo/lib/hexo/index.js:390:25
at tryCatcher (/Users/michael/Desktop/blog/node_modules/bluebird/js/release/util.js:16:23)
at /Users/michael/Desktop/blog/node_modules/bluebird/js/release/method.js:15:34
at RouteStream._read (/Users/michael/Desktop/blog/node_modules/hexo/lib/hexo/router.js:134:3)
at RouteStream.Readable.read (stream_readable.js:442:10)
at resume
(_stream_readable.js:822:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

Sidebar links display problem & gitalk language support

I want to create a new issue

Melody Information

Melody Version: 1.5.1

Platform: Ubuntu 17.10

Browser: Chrome

Expected behavior && Actual behavior

I added several links to my melody.yml:

# Sidebar Settings
# ---------------
links_title: 友情链接
links:
    #Name: url
    提问的智慧: https://gist.github.com/zer4tul/95ffaa741c836dc6ab3b
    中文维基百科: https://zh.wikipedia.org/
    ZBQTesla的博客: https://zbqtesla.github.io

But they didn't display as expected:
screenshot from 2018-04-05 12-57-57

I found the second link cannot be diaplay well, but I cannot figure out why this happened.

I would prefer displaying the links like below(I added <br> to the layout/includes/sidebar.pug file):
screenshot from 2018-04-05 12-58-43
What do you think?

Feature Request

I found I cannot change the language of gitalk in the melody.yml.

According to gitalk doc, I think you can change its language option to zh-CN if the language: zh-Hans is set in _config.yml.


Another thing, I found change the color of this theme is really convenient, I can just change them in var.styl. However the name of color variables such as $light-blue is confusing when I want to change its value. If you use $main-color, it will be much understandable. Maybe you can write documentation for color configuration?

Unhandled rejection TypeError

I want to create a new issue

Melody Information

**Melody Version:**v1.5.0

Platform: macOS 10.11.6

**Browser:**Chrome

Expected behavior

when I run$ hexo s
I expected the website can run smoothly on http://localhost:4000/

Actual behavior

but the error appears that:

Unhandled rejection TypeError: .../hexo-files/themes/melody/layout/includes/layout.pug:31
    29|       each url in theme.stylesheets
    30|         link(rel='stylesheet', href=url)
  > 31|     each item in theme.cdn.css
    32|       if item !== undefined
    33|         link(rel='stylesheet', href=item + '?version=' + version())
    34|     include ./head.pug

Cannot read property 'css' of undefined

image

and I don't know how to deal with this situation, plz help

search icon trigger Algolia immediately

I want to create a new issue

Melody Information

Melody Version: 1.5.1

Platform: Ubuntu 17.10

Browser: Chrome

Expected behavior && Actual behavior

Like you, I use Algolia for search in my blog. I found that after I click the magnifying glass icon:
in real open source you have the right to control your own destiny upupming
The search bar isn't focused:
2
It means that I have to click the search bar once more before I can input words for search, it's not convenient, can you focus cursor on the search bar immediately after I click the magnifying glass icon?

Thanks!

安装好你的主题后path报错

I want to create a new issue

Melody Information

Melody Version:
1.5.1

Platform:
windows

Browser:
chrome 63.0.3239.108

Expected behavior

Cannot read property 'path' of undefined
TypeError: D:\hexo\themes\melody\layout\includes\config.pug:1

1| -
2| var algolia;
3| var env = process.env;
4| if (theme.algolia_search.enable) {

Actual behavior

Steps to reproduce the behavior

1.hexo init
2.npm install
3.git clone -b master https://github.com/Molunerfinn/hexo-theme-melody themes/melody
4.npm install hexo-renderer-jade hexo-renderer-stylus
5.hexo clean
6.hexo g
报错
这是我的主题配置文件
`# html lang

---------------

language: en

Main menu navigation

---------------

menu:
Home: /
Archives: /archives
Tags: /tags
Categories: /categories
#XXX: /xxx

Favicon

---------------

favicon: /favicon.ico

PWA

---------------

pwa:
enable: false
manifest:

Highlight theme

---------------

highlight_theme: default

Nav settings

---------------

social:
github: https://github.com/wudiansi
weibo: http://weibo.com/

Algolia search

---------------

algolia_search:
enable: false
hits:
per_page: 10
labels:
input_placeholder: Search for Posts
hits_empty: "We didn't find any results for the search: ${query}"
hits_stats: "${hits} results found in ${time} ms"

Local search

---------------

local_search:
enable: true
labels:
input_placeholder: Search for Posts
hits_empty: "We didn't find any results for the search: ${query}"

MathJax

---------------

mathjax:
enable: false
cdn: https://cdn.bootcss.com/mathjax/2.7.2/MathJax.js?config=TeX-AMS-MML_HTMLorMML

Toggle fireworks (IE >= 10)

---------------

fireworks: true

Analysis

---------------

baidu_analytics: ae5927bb06d24dba44171a1f86c5a788

google_analytics: UA-116838574-1

stylesheets loaded in the

---------------

stylesheets:

  • /css/index.css

scripts loaded in the end of the body

---------------

scripts:

  • /js/utils.js
  • /js/fancybox.js
  • /js/sidebar.js
  • /js/copy.js
  • /js/fireworks.js
  • /js/transition.js
  • /js/scroll.js
  • /js/head.js

cdn for third-party library

---------------

cdn:
css:
fontawesome: https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.min.css
js:
anime: /js/third-party/anime.min.js
jquery: /js/third-party/jquery.min.js
fancybox: /js/third-party/jquery.fancybox.min.js
velocity: /js/third-party/velocity.min.js
velocity-ui: /js/third-party/velocity.ui.min.js

Post info settings

---------------

avatar: http://wyxj.cume.cc/command/WeiPhoto/public/img/102.img

top_img: /img/wallhaven.jpg # false or url of img

post_meta:
date_type: created # created or updated
categories: true
tags: true

wordcount:
enable: true

toc:
enable: true

post_copyright:
enable: true
license: CC BY-NC-SA 4.0
license_url: https://creativecommons.org/licenses/by-nc-sa/4.0/

auto_excerpt:
enable: true
length: 150

slide

For reveal.js config, see https://github.com/hakimel/reveal.js#configuration

slide:
separator: ---
separator_vertical: --
charset: utf-8
theme: black

optional

mouseWheel: false
transition: slide
transitionSpeed: default
parallaxBackgroundImage: ''
parallaxBackgroundSize: ''
parallaxBackgroundHorizontal: null
parallaxBackgroundVertical: null

QR_code:

  • itemlist:
    img: /img/alipay.jpg
    text: 支付宝打赏
  • itemlist:
    img: /img/wechat.jpg
    text: 微信打赏

adv:

enable: false

info:

Share System

---------------

addThis:
enable: true
pubid: ra-5ac1cdb672a640e8

sharejs:

enable: false

disabled_sites:

Comments System

---------------

disqus:
enable: true
shortname: disqus_hWLNnarbNk
count: true

laibili:

enable: false

uid:

gitment

enable: false

owner:

repo:

client_id:

client_secret:

gitalk:

enable: false

client_id:

client_secret:

repo:

owner:

admin:

valine comment system. https://valine.js.org

valine:

enable: false # if you want use valine,please set this value is ture

appId: # leancloud application app id

appKey: # leancloud application app key

notify: false # valine mail notify (true/false) https://github.com/xCss/Valine/wiki

verify: false # valine verify code (true/false)

pageSize: 10 # comment list page size

avatar: mm # gravatar style https://valine.js.org/#/avatar

lang: zh-cn # i18n: zh-cn/en

placeholder: Just go go # valine comment input placeholder(like: Please leave your footprints )

guest_info: nick,mail,link #valine comment header inf

Footer Settings

---------------

since: 2016

ICP:
enable: false
#text:

busuanzi count for PV / UV in site

busuanzi:

count values only if the other configs are false

enable: true

custom uv span for the whole site

site_uv: true
site_uv_header:
site_uv_footer:

custom pv span for the whole site

site_pv: true
site_pv_header:
site_pv_footer:

custom pv span for one page only

page_pv: true
page_pv_header:
page_pv_footer:

Sidebar Settings

---------------

links_title: Links
links:
前端情报局: https://news.awesomes.cn/
merrier说: http://merrier.wang/
邱庆羽: http://www.qiuqingyu.cn
`

Feature Request

按照你的文档引入了你的主题,也安装了jade stylus ,但是无论我如何实现安装,都会有上面的错误提示。

Tips about theme

Dear Molunerfinn
Your theme is really great!
However, I found that there was a code error in the topic development mentioned in your blog!

Error:>hexo-jade-renderer hexo-stylus-renderer

Right:>hexo-renderer-jade hexo-renderer-stylus

Finally, I want to thank you. You make me feel like I can still hold on to the web, thank you for your theme

文章详情页无法渲染

更新了一下版本1.4.3后,出现详情页无法渲染的情况,首页正常。

ERROR D:\blog\themes\melody\layout\post.pug:23

21| if (index < page.categories.data.length - 1)
22| i.fa.fa-angle-right(aria-hidden="true")
23| if (theme.disqus.enable && theme.disqus.count)
24| if (theme.post_meta.date_type || theme.post_meta.categories && page.categories.data.length > 0)
25| span.post-meta__separator |
26| i.fa.fa-comment-o.post-meta__icon(aria-hidden="true")

Cannot read property 'enable' of undefined
TypeError: D:\blog\themes\melody\layout\post.pug:23

21| if (index < page.categories.data.length - 1)
22| i.fa.fa-angle-right(aria-hidden="true")
23| if (theme.disqus.enable && theme.disqus.count)
24| if (theme.post_meta.date_type || theme.post_meta.categories && page.categories.data.length > 0)
25| span.post-meta__separator |
26| i.fa.fa-comment-o.post-meta__icon(aria-hidden="true")

Cannot read property 'enable' of undefined

at eval (eval at wrap (D:\blog\node_modules\pug-runtime\wrap.js:6:10), :745:19)
at template (eval at wrap (D:\blog\node_modules\pug-runtime\wrap.js:6:10), :1807:72)
at Theme._View.View._compiled.locals [as _compiled] (D:\blog\node_modules\hexo\lib\theme\view.js:124:48)

at Theme._View.View.View.render (D:\blog\node_modules\hexo\lib\theme\view.js:29:15)
at route.set (D:\blog\node_modules\hexo\lib\hexo\index.js:386:29)
at tryCatcher (D:\blog\node_modules\bluebird\js\release\util.js:16:23)
at D:\blog\node_modules\bluebird\js\release\method.js:15:34
at RouteStream._read (D:\blog\node_modules\hexo\lib\hexo\router.js:134:3)
at RouteStream.Readable.read (stream_readable.js:442:10)
at resume
(_stream_readable.js:822:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

关于中文

我把hexo _config.yml中的语言设置为中文,又把melody.yml中的语言设置为中文,但站点右上角的Home、Achieves等都没有变成中文,zh-Hans.yml确实存在,请问可能是什么问题

Demo sites

If you are using hexo-theme-melody, you can write your blog-site in this issue! I will add your site to the demo sites! Welcome~

Notice: It will be stopped when the demo sites' number up to 25. And if I found that your blog is no longer using hexo-theme-melody, then your site will be removed.

请教一下

如何调手机端上的顶部图和其他手机端上的东西。还有,那个电脑上的顶部图用url的话怎么调大小。这是我的 https://wafau.github.io,谢谢!

主题页面如何开启评论功能

对于一些独立的主题页面如关于、留言板等,这些页面需要评论功能。
我在这些独立页面的头部增加 comments: true无效。

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.