GithubHelp home page GithubHelp logo

hexo-theme-huxblog's Introduction

Hexo-Theme-Huxblog

Ported Theme of Hux Blog, Thank Huxpro for designing such a flawless theme.

Usage

I didn't publish it as a single theme folder because a few of the pages are added and modified manually, so you should manually create some extra folders in source for the new pages and modify the _config.yml if you only have the single theme folder.

So i just pushed the whole hexo project for your convenience, all pre settings and boilerplates are included, have a look and go ahead customizing your own blog!

1.Init
git clone https://github.com/Kaijun/hexo-theme-huxblog.git
cd hexo-theme-huxblog
npm install
2.Modify

Modify _config.yml file with your own info. Especially the section:

deploy:
  type: git
  repo: https://github.com/Kaijun/hexo-theme-huxblog
  branch: gh-pages

Replace with your own repo!

3.Writting/Serve/Deploy
hexo new post IMAPOST
hexo serve // run hexo in local environment
hexo clean && hexo deploy // hexo will push the static files automatically into the specific branch(gh-pages) of your repo!
4.Enjoy!

Please Star this Project if you like it! Following would also be appreciated!

hexo-theme-huxblog's People

Contributors

haojen avatar hendrawd avatar kaijun avatar randyx233 avatar yeomanyang 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

hexo-theme-huxblog's Issues

这个怎么回事?主题不好用啊

$ hexo s
INFO Start processing
INFO Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.
Unhandled rejection TypeError: C:\hexoblog\themes\hexo-theme-huxblog\layout\layo ut.ejs:9
7|

<%- body %>

8| <% if (theme.sidebar && theme.sidebar !== 'bottom'){ %>

9| <%- partial('partial/sidebar', null, {cache: !config.relative link}) %>
10| <% } %>
11|
12| <%- partial('_partial/footer', null, {cache: !config.relative_link }) %>

C:\hexoblog\themes\hexo-theme-huxblog\layout_partial\sidebar.ejs:2
1| <aside id="sidebar"<% if (theme.sidebar === 'bottom'){ %> class="outer"<% } %>>

2| <% theme.widgets.forEach(function(widget){ %>
3| <%- partial('_widget/' + widget) %>
4| <% }) %>
5|

Cannot read property 'forEach' of undefined
at eval (eval at (C:\hexoblog\node_modules\hexo-renderer-ejs\nod e_modules\ejs\lib\ejs.js:242:14), :30:185)
at eval (eval at (C:\hexoblog\node_modules\hexo-renderer-ejs\nod e_modules\ejs\lib\ejs.js:242:14), :30:342)
at C:\hexoblog\node_modules\hexo-renderer-ejs\node_modules\ejs\lib\ejs.js:25 5:15
at _compiledSync (C:\hexoblog\node_modules\hexo\lib\theme\view.js:122:20)
at View.renderSync (C:\hexoblog\node_modules\hexo\lib\theme\view.js:50:21)
at C:\hexoblog\node_modules\hexo\lib\plugins\helper\partial.js:38:21
at Object.fragmentCache (C:\hexoblog\node_modules\hexo\lib\plugins\helper\fr agment_cache.js:9:30)
at Object.wrapper [as fragment_cache] (C:\hexoblog\node_modules\hexo\node_mo dules\lodash\lodash.js:4994:19)
at Object.partial (C:\hexoblog\node_modules\hexo\lib\plugins\helper\partial. js:37:19)
at Object.wrapper (C:\hexoblog\node_modules\hexo\node_modules\lodash\lodash. js:4994:19)
at eval (eval at (C:\hexoblog\node_modules\hexo-renderer-ejs\nod e_modules\ejs\lib\ejs.js:242:14), :30:443)
at eval (eval at (C:\hexoblog\node_modules\hexo-renderer-ejs\nod e_modules\ejs\lib\ejs.js:242:14), :30:890)
at C:\hexoblog\node_modules\hexo-renderer-ejs\node_modules\ejs\lib\ejs.js:25 5:15
at _compiled (C:\hexoblog\node_modules\hexo\lib\theme\view.js:127:30)
at View.render (C:\hexoblog\node_modules\hexo\lib\theme\view.js:29:15)
at C:\hexoblog\node_modules\hexo\lib\theme\view.js:40:23
at tryCatcher (C:\hexoblog\node_modules\hexo\node_modules\bluebird\js\releas e\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\hexoblog\node_modules\hexo\node_mod ules\bluebird\js\release\promise.js:510:31)
at Promise._settlePromise (C:\hexoblog\node_modules\hexo\node_modules\bluebi rd\js\release\promise.js:567:18)
at Promise._settlePromise0 (C:\hexoblog\node_modules\hexo\node_modules\blueb ird\js\release\promise.js:612:10)
at Promise._settlePromises (C:\hexoblog\node_modules\hexo\node_modules\blueb ird\js\release\promise.js:691:18)
at Async._drainQueue (C:\hexoblog\node_modules\hexo\node_modules\bluebird\js \release\async.js:138:16)
at Async._drainQueues (C:\hexoblog\node_modules\hexo\node_modules\bluebird\j s\release\async.js:148:10)
at Immediate.Async.drainQueues [as _onImmediate] (C:\hexoblog\node_modules\h exo\node_modules\bluebird\js\release\async.js:17:14)
at processImmediate [as _immediateCallback] (timers.js:383:17)
Unhandled rejection TypeError: C:\hexoblog\themes\hexo-theme-huxblog\layout\layo ut.ejs:9
7|

<%- body %>

8| <% if (theme.sidebar && theme.sidebar !== 'bottom'){ %>

9| <%- partial('partial/sidebar', null, {cache: !config.relative link}) %>
10| <% } %>
11|
12| <%- partial('_partial/footer', null, {cache: !config.relative_link }) %>

C:\hexoblog\themes\hexo-theme-huxblog\layout_partial\sidebar.ejs:2
1| <aside id="sidebar"<% if (theme.sidebar === 'bottom'){ %> class="outer"<% } %>>

2| <% theme.widgets.forEach(function(widget){ %>
3| <%- partial('_widget/' + widget) %>
4| <% }) %>
5|

Cannot read property 'forEach' of undefined
at eval (eval at (C:\hexoblog\node_modules\hexo-renderer-ejs\nod e_modules\ejs\lib\ejs.js:242:14), :30:185)
at eval (eval at (C:\hexoblog\node_modules\hexo-renderer-ejs\nod e_modules\ejs\lib\ejs.js:242:14), :30:342)
at C:\hexoblog\node_modules\hexo-renderer-ejs\node_modules\ejs\lib\ejs.js:25 5:15
at _compiledSync (C:\hexoblog\node_modules\hexo\lib\theme\view.js:122:20)
at View.renderSync (C:\hexoblog\node_modules\hexo\lib\theme\view.js:50:21)
at C:\hexoblog\node_modules\hexo\lib\plugins\helper\partial.js:38:21
at Object.fragmentCache (C:\hexoblog\node_modules\hexo\lib\plugins\helper\fr agment_cache.js:9:30)
at Object.wrapper [as fragment_cache] (C:\hexoblog\node_modules\hexo\node_mo dules\lodash\lodash.js:4994:19)
at Object.partial (C:\hexoblog\node_modules\hexo\lib\plugins\helper\partial. js:37:19)
at Object.wrapper (C:\hexoblog\node_modules\hexo\node_modules\lodash\lodash. js:4994:19)
at eval (eval at (C:\hexoblog\node_modules\hexo-renderer-ejs\nod e_modules\ejs\lib\ejs.js:242:14), :30:443)
at eval (eval at (C:\hexoblog\node_modules\hexo-renderer-ejs\nod e_modules\ejs\lib\ejs.js:242:14), :30:890)
at C:\hexoblog\node_modules\hexo-renderer-ejs\node_modules\ejs\lib\ejs.js:25 5:15
at _compiled (C:\hexoblog\node_modules\hexo\lib\theme\view.js:127:30)
at View.render (C:\hexoblog\node_modules\hexo\lib\theme\view.js:29:15)
at C:\hexoblog\node_modules\hexo\lib\theme\view.js:40:23
at tryCatcher (C:\hexoblog\node_modules\hexo\node_modules\bluebird\js\releas e\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\hexoblog\node_modules\hexo\node_mod ules\bluebird\js\release\promise.js:510:31)
at Promise._settlePromise (C:\hexoblog\node_modules\hexo\node_modules\bluebi rd\js\release\promise.js:567:18)
at Promise._settlePromise0 (C:\hexoblog\node_modules\hexo\node_modules\blueb ird\js\release\promise.js:612:10)
at Promise._settlePromises (C:\hexoblog\node_modules\hexo\node_modules\blueb ird\js\release\promise.js:691:18)
at Async._drainQueue (C:\hexoblog\node_modules\hexo\node_modules\bluebird\js \release\async.js:138:16)
at Async._drainQueues (C:\hexoblog\node_modules\hexo\node_modules\bluebird\j s\release\async.js:148:10)
at Immediate.Async.drainQueues [as _onImmediate] (C:\hexoblog\node_modules\h exo\node_modules\bluebird\js\release\async.js:17:14)
at processImmediate [as _immediateCallback] (timers.js:383:17)
Unhandled rejection TypeError: C:\hexoblog\themes\hexo-theme-huxblog\layout\layo ut.ejs:9
7|

<%- body %>

8| <% if (theme.sidebar && theme.sidebar !== 'bottom'){ %>

9| <%- partial('partial/sidebar', null, {cache: !config.relative link}) %>
10| <% } %>
11|
12| <%- partial('_partial/footer', null, {cache: !config.relative_link }) %>

C:\hexoblog\themes\hexo-theme-huxblog\layout_partial\sidebar.ejs:2
1| <aside id="sidebar"<% if (theme.sidebar === 'bottom'){ %> class="outer"<% } %>>

2| <% theme.widgets.forEach(function(widget){ %>
3| <%- partial('_widget/' + widget) %>
4| <% }) %>
5|

Cannot read property 'forEach' of undefined
at eval (eval at (C:\hexoblog\node_modules\hexo-renderer-ejs\nod e_modules\ejs\lib\ejs.js:242:14), :30:185)
at eval (eval at (C:\hexoblog\node_modules\hexo-renderer-ejs\nod e_modules\ejs\lib\ejs.js:242:14), :30:342)
at C:\hexoblog\node_modules\hexo-renderer-ejs\node_modules\ejs\lib\ejs.js:25 5:15
at _compiledSync (C:\hexoblog\node_modules\hexo\lib\theme\view.js:122:20)
at View.renderSync (C:\hexoblog\node_modules\hexo\lib\theme\view.js:50:21)
at C:\hexoblog\node_modules\hexo\lib\plugins\helper\partial.js:38:21
at Object.fragmentCache (C:\hexoblog\node_modules\hexo\lib\plugins\helper\fr agment_cache.js:9:30)
at Object.wrapper [as fragment_cache] (C:\hexoblog\node_modules\hexo\node_mo dules\lodash\lodash.js:4994:19)
at Object.partial (C:\hexoblog\node_modules\hexo\lib\plugins\helper\partial. js:37:19)
at Object.wrapper (C:\hexoblog\node_modules\hexo\node_modules\lodash\lodash. js:4994:19)
at eval (eval at (C:\hexoblog\node_modules\hexo-renderer-ejs\nod e_modules\ejs\lib\ejs.js:242:14), :30:443)
at eval (eval at (C:\hexoblog\node_modules\hexo-renderer-ejs\nod e_modules\ejs\lib\ejs.js:242:14), :30:890)
at C:\hexoblog\node_modules\hexo-renderer-ejs\node_modules\ejs\lib\ejs.js:25 5:15
at _compiled (C:\hexoblog\node_modules\hexo\lib\theme\view.js:127:30)
at View.render (C:\hexoblog\node_modules\hexo\lib\theme\view.js:29:15)
at C:\hexoblog\node_modules\hexo\lib\theme\view.js:40:23
at tryCatcher (C:\hexoblog\node_modules\hexo\node_modules\bluebird\js\releas e\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\hexoblog\node_modules\hexo\node_mod ules\bluebird\js\release\promise.js:510:31)
at Promise._settlePromise (C:\hexoblog\node_modules\hexo\node_modules\bluebi rd\js\release\promise.js:567:18)
at Promise._settlePromise0 (C:\hexoblog\node_modules\hexo\node_modules\blueb ird\js\release\promise.js:612:10)
at Promise._settlePromises (C:\hexoblog\node_modules\hexo\node_modules\blueb ird\js\release\promise.js:691:18)
at Async._drainQueue (C:\hexoblog\node_modules\hexo\node_modules\bluebird\js \release\async.js:138:16)
at Async._drainQueues (C:\hexoblog\node_modules\hexo\node_modules\bluebird\j s\release\async.js:148:10)
at Immediate.Async.drainQueues [as _onImmediate] (C:\hexoblog\node_modules\h exo\node_modules\bluebird\js\release\async.js:17:14)
at processImmediate [as _immediateCallback] (timers.js:383:17)
Unhandled rejection TypeError: C:\hexoblog\themes\hexo-theme-huxblog\layout\layo ut.ejs:9
7|

<%- body %>

8| <% if (theme.sidebar && theme.sidebar !== 'bottom'){ %>

9| <%- partial('partial/sidebar', null, {cache: !config.relative link}) %>
10| <% } %>
11|
12| <%- partial('_partial/footer', null, {cache: !config.relative_link }) %>

C:\hexoblog\themes\hexo-theme-huxblog\layout_partial\sidebar.ejs:2
1| <aside id="sidebar"<% if (theme.sidebar === 'bottom'){ %> class="outer"<% } %>>

2| <% theme.widgets.forEach(function(widget){ %>
3| <%- partial('_widget/' + widget) %>
4| <% }) %>
5|

Cannot read property 'forEach' of undefined
at eval (eval at (C:\hexoblog\node_modules\hexo-renderer-ejs\nod e_modules\ejs\lib\ejs.js:242:14), :30:185)
at eval (eval at (C:\hexoblog\node_modules\hexo-renderer-ejs\nod e_modules\ejs\lib\ejs.js:242:14), :30:342)
at C:\hexoblog\node_modules\hexo-renderer-ejs\node_modules\ejs\lib\ejs.js:25 5:15
at _compiledSync (C:\hexoblog\node_modules\hexo\lib\theme\view.js:122:20)
at View.renderSync (C:\hexoblog\node_modules\hexo\lib\theme\view.js:50:21)
at C:\hexoblog\node_modules\hexo\lib\plugins\helper\partial.js:38:21
at Object.fragmentCache (C:\hexoblog\node_modules\hexo\lib\plugins\helper\fr agment_cache.js:9:30)
at Object.wrapper [as fragment_cache] (C:\hexoblog\node_modules\hexo\node_mo dules\lodash\lodash.js:4994:19)
at Object.partial (C:\hexoblog\node_modules\hexo\lib\plugins\helper\partial. js:37:19)
at Object.wrapper (C:\hexoblog\node_modules\hexo\node_modules\lodash\lodash. js:4994:19)
at eval (eval at (C:\hexoblog\node_modules\hexo-renderer-ejs\nod e_modules\ejs\lib\ejs.js:242:14), :30:443)
at eval (eval at (C:\hexoblog\node_modules\hexo-renderer-ejs\nod e_modules\ejs\lib\ejs.js:242:14), :30:890)
at C:\hexoblog\node_modules\hexo-renderer-ejs\node_modules\ejs\lib\ejs.js:25 5:15
at _compiled (C:\hexoblog\node_modules\hexo\lib\theme\view.js:127:30)
at View.render (C:\hexoblog\node_modules\hexo\lib\theme\view.js:29:15)
at C:\hexoblog\node_modules\hexo\lib\theme\view.js:40:23
at tryCatcher (C:\hexoblog\node_modules\hexo\node_modules\bluebird\js\releas e\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\hexoblog\node_modules\hexo\node_mod ules\bluebird\js\release\promise.js:510:31)
at Promise._settlePromise (C:\hexoblog\node_modules\hexo\node_modules\bluebi rd\js\release\promise.js:567:18)
at Promise._settlePromise0 (C:\hexoblog\node_modules\hexo\node_modules\blueb ird\js\release\promise.js:612:10)
at Promise._settlePromises (C:\hexoblog\node_modules\hexo\node_modules\blueb ird\js\release\promise.js:691:18)
at Async._drainQueue (C:\hexoblog\node_modules\hexo\node_modules\bluebird\js \release\async.js:138:16)
at Async._drainQueues (C:\hexoblog\node_modules\hexo\node_modules\bluebird\j s\release\async.js:148:10)
at Immediate.Async.drainQueues [as _onImmediate] (C:\hexoblog\node_modules\h exo\node_modules\bluebird\js\release\async.js:17:14)
at processImmediate [as _immediateCallback] (timers.js:383:17)

FEATURED TAGS

请问首页的FEATURED TAGS 这个是在哪设置的呢?

代码高亮功能不能正常使用

Hexo 的代码高亮依赖于 highlight.js 实现,一般在根目录的配置中

    highlight:
        enable: true
        line_number: true
        auto_detect: false
        ab_replace:

如上设置即可实现代码高亮,但是我原来使用的 yilia 主题在切换主题到 hexo-theme-huxblog 之后,代码高亮部分失效了,真的很喜欢原来的代码高亮颜色配置。
查看过 Hux 的 Jekyll 主题原来的高亮方案换成了 Ruby 的 rouge,跟 hexo 实现方案不一样。
新主题下,即便开启了 highlight enable: true ,还是没能让 highlight.js 执行,所以代码高亮失败。
奇怪的是,开启 auto_detect: true 之后,使用在```之间的代码能高亮,但是四空格缩进写的代码行,却无法高亮,目前正在困惑中,怎样才能在不大动配置的情况下,让代码能够通过 hexo 原有方案正常高亮呢, 希望得到帮助,谢谢.这是我的博客地址,描述了我的问题: color highlight test

Unhandled rejection ReferenceError

Unhandled rejection ReferenceError: /Users/xxxx/themes/huxblog/layout/page.ejs:73
71| ">
72|

73| <%- page.content || body %>
74|
75|
76| <div class="

body is not defined

你好,我把你的项目clone了,然后把huxblog的目录copy到原来的hexo项目里,其他都挺好,但是就是在

hexo d -g 的时候报错了,请问怎么解决呢/?

万分感谢

不蒜子

有没有不蒜子统计功能呢

When click post bottom tags open a blank pages

last night i try to fix post head issue , but this time i find bottom have the issue , so try to copy head post tag code

`


<% page.tags.forEach(function(tag){ %>
<%= tag.name %>
<% }) %>

`

to replace

<%- list_tags({style: '', class: '', show_count: false, separator: ''}) %>

另外, 我在自己的blog上基于这个主题, 进行了一些细微的调整:

  1. 修改了侧边栏的img大小为100%, 整个侧边栏内部居中
  2. 博文内部标题栏的排版为居中, 副标题和作者日期靠右
  3. 另外准备将上面导航栏改为下滑后自动固定在top

怎么增加归档(archives)页面

我在source目录下新增了archives/index.md,内容如下:


---
title: "存档"
description: "一个"
header-img: "img/archives-bg.jpg"

---

然后发现指定的title、descritption、题图都没有生效,archive页面和首页一模一样,请问是什么原因?

提两个小问题

  1. 在readme中 “manually create some extra folders in scaffolds for the new pages” 中的 scaffolds 应该改成 source,据我观察scaffolds并没有任何修改。
  2. _config.yml 中, sidebar-avatar: /img/avatar.jpg # use absolute URL, seeing it's used in both / and /about/,文中描述说使用绝对url,经过测试,这种写法反而不是绝对路径,应该改成img/avatar.jpg

root问题

_config.yml中的root: /hexo-theme-huxblog/改为root: /后,在本地无法查看,localhost:4000自动跳转localhost:4000/hexo-theme-huxblog
这个该怎么解决

Recommendation FRIENDS Link opens in a new window

I propose that the FRIENDS Link will open in a new window, and I have a modify plan as flow:

<% config.friends.forEach(function(friend){ %>
-                        <li><a href="<%= friend.href %>"><%= friend.title %></a></li>
+                        <li><a href="<%= friend.href %>" target="_blank"><%= friend.title %></a></li>
<% }); %>

body is not defined when create a new page

我在创建一个新页面时使用 hexo new page Gallery 命令,想创建一个新的页面,但是在创建完成后,执行hexo g 时,报出以下异常:

Unhandled rejection ReferenceError: /home/****/blog/test/themes/huxblog/layout/page.ejs:73

71| ">
72|

73| <%- body % >
74|
75|
76| <div class="

body is not defined
at eval (eval at (/home/×××/blog/test/node_modules/ejs/lib/ejs.js:242:14), :30:3387)
at eval (eval at (/home/×××/blog/test/node_modules/ejs/lib/ejs.js:242:14), :30:11625)
at null._compiledSync (/home/×××/blog/test/node_modules/ejs/lib/ejs.js:255:15)
at tryCatcher (/home/×××/blog/test/node_modules/bluebird/js/release/util.js:16:23)
at null._compiled (/home/×××/blog/test/node_modules/bluebird/js/release/method.js:15:34)
at View.render (/home/×××/blog/test/node_modules/hexo/lib/theme/view.js:29:15)
at /home/×××/blog/test/node_modules/hexo/lib/hexo/index.js:387:25
at tryCatcher (/home/×××/blog/test/node_modules/bluebird/js/release/util.js:16:23)
at /home/×××/blog/test/node_modules/bluebird/js/release/method.js:15:34
at RouteStream._read (/home/×××/blog/test/node_modules/hexo/lib/hexo/router.js:134:3)
at RouteStream.Readable.read (stream_readable.js:336:10)
at resume
(_stream_readable.js:726:12)
at _combinedTickCallback (node.js:377:13)
at process._tickCallback (node.js:401:11)

我尝试者去解决,但是没能完成。我看到了commit id为e6f94e79bbb4ce1d2300195e1cc1c87acd1f5422的提交遇到了同样的问题,但是不知道是否和本问题是同样的问题。

关于FRIENDS以及导航栏目的两个问题

  1. FRIENDS这个特性如果不想使用了,如何关闭呢?
  2. 我想增加一个新的导航栏目“SHARE”,并且调整几个已有导航栏目的顺序,该如何实现呢?
    如上,谢谢!

Avatar 图片不显示

Avatar 图片不显示

网页源码为
<img src="//img/avatar.jpg">
经查为 theme 中 layout 文件夹下 page.ejs 文件第176行
<img src="<%= config['root'] %><%= config['sidebar-avatar'] %>" />
<%= config['root'] %> 部分多添加了一个 /
请告知我找的是否为问题所在,毕竟所知有限,谢谢。

Cannot read property 'forEach' of undefined

报个 BUG

Unhandled rejection TypeError: /Users/baidu/Documents/opensource/blog/themes/huxblog/layout/layout.ejs:9
    7|         <section id="main"><%- body %></section>
    8|         <% if (theme.sidebar && theme.sidebar !== 'bottom'){ %>
 >> 9|           <%- partial('_partial/sidebar', null, {cache: !config.relative_link}) %>
    10|         <% } %>
    11|       </div>
    12|       <%- partial('_partial/footer', null, {cache: !config.relative_link}) %>

/Users/baidu/Documents/opensource/blog/themes/huxblog/layout/_partial/sidebar.ejs:2
    1| <aside id="sidebar"<% if (theme.sidebar === 'bottom'){ %> class="outer"<% } %>>
 >> 2|   <% theme.widgets.forEach(function(widget){ %>
    3|     <%- partial('_widget/' + widget) %>
    4|   <% }) %>
    5| </aside>

Cannot read property 'forEach' of undefined
    at eval (eval at <anonymous> (/Users/baidu/Documents/opensource/blog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:30:185)
    at eval (eval at <anonymous> (/Users/baidu/Documents/opensource/blog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:30:342)
    at null._compiledSync (/Users/baidu/Documents/opensource/blog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:255:15)
    at View.renderSync (/Users/baidu/Documents/opensource/blog/node_modules/hexo/lib/theme/view.js:50:21)
    at /Users/baidu/Documents/opensource/blog/node_modules/hexo/lib/plugins/helper/partial.js:38:21
    at Object.fragmentCache (/Users/baidu/Documents/opensource/blog/node_modules/hexo/lib/plugins/helper/fragment_cache.js:9:30)
    at Object.wrapper [as fragment_cache] (/Users/baidu/Documents/opensource/blog/node_modules/hexo/node_modules/lodash/lodash.js:4436:19)
    at Object.partial (/Users/baidu/Documents/opensource/blog/node_modules/hexo/lib/plugins/helper/partial.js:37:19)
    at Object.wrapper (/Users/baidu/Documents/opensource/blog/node_modules/hexo/node_modules/lodash/lodash.js:4436:19)
    at eval (eval at <anonymous> (/Users/baidu/Documents/opensource/blog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:30:443)
    at eval (eval at <anonymous> (/Users/baidu/Documents/opensource/blog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:30:890)
    at null._compiledSync (/Users/baidu/Documents/opensource/blog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:255:15)
    at tryCatcher (/Users/baidu/Documents/opensource/blog/node_modules/hexo/node_modules/bluebird/js/release/util.js:16:23)
    at null._compiled (/Users/baidu/Documents/opensource/blog/node_modules/hexo/node_modules/bluebird/js/release/method.js:15:34)
    at View.render (/Users/baidu/Documents/opensource/blog/node_modules/hexo/lib/theme/view.js:29:15)
    at /Users/baidu/Documents/opensource/blog/node_modules/hexo/lib/theme/view.js:40:23
    at tryCatcher (/Users/baidu/Documents/opensource/blog/node_modules/hexo/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/baidu/Documents/opensource/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:502:31)
    at Promise._settlePromise (/Users/baidu/Documents/opensource/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:559:18)
    at Promise._settlePromiseCtx (/Users/baidu/Documents/opensource/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:596:10)
    at Async._drainQueue (/Users/baidu/Documents/opensource/blog/node_modules/hexo/node_modules/bluebird/js/release/async.js:143:12)
    at Async._drainQueues (/Users/baidu/Documents/opensource/blog/node_modules/hexo/node_modules/bluebird/js/release/async.js:148:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/Users/baidu/Documents/opensource/blog/node_modules/hexo/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

当点击文章内部的 tag 时, 跳转到只包含页头和页脚的空白页面

折腾了一下午, 对比着该主题的原作者Hux的 Jekyll 源代码, 发现问题出现在布局文件里的 post.ejs 里面

Hux 的 Jekyll 代码 (注意 '#' 号)

<a class="tag" href="{{ site.baseurl }}/tags/#{{ tag }}" title="{{ tag }}">{{ tag }}</a>

Kaijun 的 hexo 代码

<a class="tag" href="<%= config.root %><%= tag.path %>" title="<%= tag.name %>"><%= tag.name %></a>

当点击 tag 时 , 发现 URL 里的地址指向了 username.github.io/tags/sometag , 而不是预期的 username.github.io/tags/#sometag
所以我尝试着添加以下代码

<a class="tag" href="<%= config.root %>tags/#<% tag.name %>" title="<%= tag.name %>"><%= tag.name %></a>

Done , 重新编译后问题解决.
稍后奉上人生第一个 pull request

重复代码问题

about.ejs 引用了 page.ejs

两者都引用了duoshuo 和 disqus 对代码段,意义不明啊,建议删除一处

keynote 这个怎么玩?

折腾了一晚上 大部分都可以跑通了 想请教一下 keynote这个怎么玩?

不着急回复,有时间看到再回复吧,我也困了想睡觉了~

Have a nice weekend!

非常感谢你所做的!

markdown的header前面会有#,还是个链接

刚从jacman切换到这个主题。按照readme安装。
可是正常markdown语法写出来的header,比如二级 ## 2nd Header,显示出来会是“# 2nd Header”,而且前面那个“#”,还是个指向文末的链接。不知是为什么。

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.