GithubHelp home page GithubHelp logo

hexojs / hexo Goto Github PK

View Code? Open in Web Editor NEW
38.5K 38.5K 4.7K 5.63 MB

A fast, simple & powerful blog framework, powered by Node.js.

Home Page: https://hexo.io

License: MIT License

JavaScript 0.79% Shell 0.01% TypeScript 99.20%
hexo javascript nodejs static-site-generator typescript

hexo's Introduction

Hexo logo

Hexo

A fast, simple & powerful blog framework, powered by Node.js.

Website | Documentation | Installation Guide | Contribution Guide | Code of Conduct | API | Twitter

NPM version Required Node version Build Status dependencies Status Coverage Status Gitter Discord Chat Telegram Chat FOSSA Status Contributor Covenant

Features

  • Blazing fast generating
  • Support for GitHub Flavored Markdown and most Octopress plugins
  • One-command deploy to GitHub Pages, Heroku, etc.
  • Powerful API for limitless extensibility
  • Hundreds of themes & plugins

Quick Start

Install Hexo

$ npm install hexo-cli -g

Install with brew on macOS and Linux:

$ brew install hexo

Setup your blog

$ hexo init blog
$ cd blog

Start the server

$ hexo server

Create a new post

$ hexo new "Hello Hexo"

Generate static files

$ hexo generate

More Information

Contributing

We welcome you to join the development of Hexo. Please see contributing document. 🤗

Also, we welcome PR or issue to official-plugins.

Contributors

Backers

Backers

Sponsors

Sponsors

License

FOSSA Status

hexo's People

Contributors

aausch avatar akfish avatar chenall avatar curbengh avatar d-sketon avatar dailyrandomphoto avatar dependabot-preview[bot] avatar dependabot[bot] avatar heroicyang avatar himself65 avatar jiangtj avatar jlhwung avatar leesei avatar liuhongjiang avatar magicianshiro avatar naokiy avatar noahdragon avatar renbaoshuo avatar seaoak avatar segayuu avatar stevenjoezhang avatar sukkaw avatar tcrowe avatar tomap avatar tommy351 avatar uiolee avatar weyusi avatar wolfgangkluge avatar xuanwo avatar yoshinorin 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  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

hexo's Issues

有时generate会报错

不是每次运行都报错,错误信息如下:

hexo$ hexo generate
Loading.

/usr/local/share/npm/lib/node_modules/hexo/lib/util/file.js:72
        if (err) throw err;
                       ^
Error: EMFILE, readdir '/Users/pharaohnie/hexo/themes/light/source//css/_base'

求助 fatal: 'furtee.github.com' does not appear to be a git repository

我按照 Doc 里提供的流程安装了 hexo, 本地4000端口能够预览,但是输入 hexo deploy 命令后出现如下错误,请问如何解决呢?

fatal: 'furtee.github.com' does not appear to be a git repository

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

而且好像我的 master 分支也不对头,能否帮我看看 https://github.com/trai25/furtee.github.com
我是新人,刚接触 git 不久,也许是一些低级错误,还请 tommy351 兄指导,感谢!

支持ssh(rsync)的deploy方式

之前使用octpress都是放在自己的服务器上,直接用ssh的方式deploy。github的访问速度和稳定性在**大陆不知道什么时候就会出问题。

hexo能否加上ssh deploy的支持呢?

请把octopress的img给port过来吧

使用rss migrator的时候都变成了纯html,很不方便书写。

能否把octopress中的img标签也port到hexo中,这样基本就可以100%的迁移到hexo中了。

rsync的deploy方式报错

配置如下:

deploy:
  type: rsync
  host: xxx.xxx.xxx.xx
  user: root
  root: /home/hexo
  port: 23525

rsync deploy后直接就是rsync的help了,估计是rsync的命令格式有误

hexo$ hexo deploy
Syncing.
rsync  version 2.6.9  protocol version 29
Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.
<http://rsync.samba.org/>
Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles,
              inplace, IPv6, 64-bit system inums, 64-bit internal inums

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

rsync is a file transfer program capable of efficient remote update
via a fast differencing algorithm.

Usage: rsync [OPTION]... SRC [SRC]... DEST
  or   rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST
  or   rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST
  or   rsync [OPTION]... SRC [SRC]... rsync://[USER@]HOST[:PORT]/DEST
  or   rsync [OPTION]... [USER@]HOST:SRC [DEST]
  or   rsync [OPTION]... [USER@]HOST::SRC [DEST]
  or   rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC [DEST]
The ':' usages connect via remote shell, while '::' & 'rsync://' usages connect
to an rsync daemon, and require SRC or DEST to start with a module name.


Options
 -v, --verbose               increase verbosity
 -q, --quiet                 suppress non-error messages
     --no-motd               suppress daemon-mode MOTD (see manpage caveat)
 -c, --checksum              skip based on checksum, not mod-time & size
 -a, --archive               archive mode; same as -rlptgoD (no -H)
     --no-OPTION             turn off an implied OPTION (e.g. --no-D)
 -r, --recursive             recurse into directories
 -R, --relative              use relative path names
     --no-implied-dirs       don't send implied dirs with --relative
 -b, --backup                make backups (see --suffix & --backup-dir)
     --backup-dir=DIR        make backups into hierarchy based in DIR
     --suffix=SUFFIX         set backup suffix (default ~ w/o --backup-dir)
 -u, --update                skip files that are newer on the receiver
     --inplace               update destination files in-place (SEE MAN PAGE)
     --append                append data onto shorter files
 -d, --dirs                  transfer directories without recursing
 -l, --links                 copy symlinks as symlinks
 -L, --copy-links            transform symlink into referent file/dir
     --copy-unsafe-links     only "unsafe" symlinks are transformed
     --safe-links            ignore symlinks that point outside the source tree
 -k, --copy-dirlinks         transform symlink to a dir into referent dir
 -K, --keep-dirlinks         treat symlinked dir on receiver as dir
 -H, --hard-links            preserve hard links
 -p, --perms                 preserve permissions
     --executability         preserve the file's executability
     --chmod=CHMOD           affect file and/or directory permissions
 -o, --owner                 preserve owner (super-user only)
 -g, --group                 preserve group
     --devices               preserve device files (super-user only)
     --specials              preserve special files
 -D                          same as --devices --specials
 -t, --times                 preserve times
 -O, --omit-dir-times        omit directories when preserving times
     --super                 receiver attempts super-user activities
 -S, --sparse                handle sparse files efficiently
 -n, --dry-run               show what would have been transferred
 -W, --whole-file            copy files whole (without rsync algorithm)
 -x, --one-file-system       don't cross filesystem boundaries
 -B, --block-size=SIZE       force a fixed checksum block-size
 -e, --rsh=COMMAND           specify the remote shell to use
     --rsync-path=PROGRAM    specify the rsync to run on the remote machine
     --existing              skip creating new files on receiver
     --ignore-existing       skip updating files that already exist on receiver
     --remove-source-files   sender removes synchronized files (non-dirs)
     --del                   an alias for --delete-during
     --delete                delete extraneous files from destination dirs
     --delete-before         receiver deletes before transfer (default)
     --delete-during         receiver deletes during transfer, not before
     --delete-after          receiver deletes after transfer, not before
     --delete-excluded       also delete excluded files from destination dirs
     --ignore-errors         delete even if there are I/O errors
     --force                 force deletion of directories even if not empty
     --max-delete=NUM        don't delete more than NUM files
     --max-size=SIZE         don't transfer any file larger than SIZE
     --min-size=SIZE         don't transfer any file smaller than SIZE
     --partial               keep partially transferred files
     --partial-dir=DIR       put a partially transferred file into DIR
     --delay-updates         put all updated files into place at transfer's end
 -m, --prune-empty-dirs      prune empty directory chains from the file-list
     --numeric-ids           don't map uid/gid values by user/group name
     --timeout=TIME          set I/O timeout in seconds
 -I, --ignore-times          don't skip files that match in size and mod-time
     --size-only             skip files that match in size
     --modify-window=NUM     compare mod-times with reduced accuracy
 -T, --temp-dir=DIR          create temporary files in directory DIR
 -y, --fuzzy                 find similar file for basis if no dest file
     --compare-dest=DIR      also compare destination files relative to DIR
     --copy-dest=DIR         ... and include copies of unchanged files
     --link-dest=DIR         hardlink to files in DIR when unchanged
 -z, --compress              compress file data during the transfer
     --compress-level=NUM    explicitly set compression level
 -C, --cvs-exclude           auto-ignore files the same way CVS does
 -f, --filter=RULE           add a file-filtering RULE
 -F                          same as --filter='dir-merge /.rsync-filter'
                             repeated: --filter='- .rsync-filter'
     --exclude=PATTERN       exclude files matching PATTERN
     --exclude-from=FILE     read exclude patterns from FILE
     --include=PATTERN       don't exclude files matching PATTERN
     --include-from=FILE     read include patterns from FILE
     --files-from=FILE       read list of source-file names from FILE
 -0, --from0                 all *-from/filter files are delimited by 0s
     --address=ADDRESS       bind address for outgoing socket to daemon
     --port=PORT             specify double-colon alternate port number
     --sockopts=OPTIONS      specify custom TCP options
     --blocking-io           use blocking I/O for the remote shell
     --stats                 give some file-transfer stats
 -8, --8-bit-output          leave high-bit chars unescaped in output
 -h, --human-readable        output numbers in a human-readable format
     --progress              show progress during transfer
 -P                          same as --partial --progress
 -i, --itemize-changes       output a change-summary for all updates
     --out-format=FORMAT     output updates using the specified FORMAT
     --log-file=FILE         log what we're doing to the specified FILE
     --log-file-format=FMT   log updates using the specified FMT
     --password-file=FILE    read password from FILE
     --list-only             list the files instead of copying them
     --bwlimit=KBPS          limit I/O bandwidth; KBytes per second
     --write-batch=FILE      write a batched update to FILE
     --only-write-batch=FILE like --write-batch but w/o updating destination
     --read-batch=FILE       read a batched update from FILE
     --protocol=NUM          force an older protocol version to be used
 -E, --extended-attributes   copy extended attributes
     --cache                 disable fcntl(F_NOCACHE)
 -4, --ipv4                  prefer IPv4
 -6, --ipv6                  prefer IPv6
     --version               print version number
(-h) --help                  show this help (-h works with no other options)

Use "rsync --daemon --help" to see the daemon-mode command-line options.
Please see the rsync(1) and rsyncd.conf(5) man pages for full documentation.
See http://rsync.samba.org/ for updates, bug reports, and answers
rsync error: syntax or usage error (code 1) at /SourceCache/rsync/rsync-42/rsync/main.c(1385) [receiver=2.6.9]

Generate error

環境

  • OSX 10.8.2
  • Hexo 0.1.11

事前已看過 #4 的解決方法,已仔細檢查過全局檔案皆有在冒號後加上空白鍵,不過該錯誤依然存在:

/Users/<user name>/nvm/v0.8.14/lib/node_modules/hexo/node_modules/yamljs/bin/yaml.js:1219
            throw new YamlParseException('Unable to parse.', this.getRealCurrentLineNb
YamlParseException: Unable to parse.

重新安裝 nvm + node.js + hexo 問題依然存在,求解答。

generate error

everything is OK on 0.4.5
after updating to 0.5.1, generating will throw an error. I don't know why
thanks
error

无法生成主题

hexo generate生成的文章,无论在localsever里,还是在vps上,都没有使用主题,我在_config.yml里已经设置成使用light主题了。
请问如何解决呢?
这是我的_config.yml里的相关设置

Extensions

plugins:
theme: light
exclude_generator:

config error

如果在_config.yml添加

deploy:
  type:github
  repository:yhben.github.com
  branch:master

或者添加

disqus_shortname:yhben

後,在終端輸入指令_hexo config_,提示

/usr/local/lib/node_modules/hexo/node_modules/yamljs/bin/yaml.js:1219
            throw new YamlParseException('Unable to parse.', this.getRealCurrentLineNb
                  ^
YamlParseException: Unable to parse.

請問該如何解決?

:)

init 问题

在VPS上生成文件时报错
Initializing.

stream.js:81
throw er; // Unhandled stream error in pipe.
^
Error: ENOENT, open '/home/marvin/.nvm/v0.8.14/lib/node_modules/hexo/files/init/.gitignore'

OS:Archlinux
kernel:3.6.11-1-ARCH

light主题的照片排列问题

我的markdown代码如下

{% img /downloads/image/20121226/IMG_3345.jpg 350 350 %}

{% img /downloads/image/20121226/IMG_3346.jpg 350 350 %}

{% img /downloads/image/20121226/IMG_3347.jpg 350 350 %}

{% img /downloads/image/20121226/IMG_3348.jpg 350 350 %}

但显示结果有问题

应该是主题的css设置问题吧?

gist file not wok

gist file not wok

in
/lib/tag/gist.js

line 5,
file = args.length ? '/' + args[0] : '';

to
file = args.length ? '?file=' + args[0] : '';

生成url的空格问题

如果blog的title中含有空格,生成文章的url也带有空格,建议把空格改为"_"

0.4.5又出现了偶尔generate报错的问题

hexo$ hexo generate
Loading.

/usr/local/share/npm/lib/node_modules/hexo/lib/util/file.js:72
        if (err) throw err;
                       ^
Error: EMFILE, readdir '/Users/pharaohnie/hexo/themes/light/source//css/_base'

img tag的问题

我使用如下语法

{% img /downloads/image/20121222/001.jpg %}

但转换出的html如下

<img src="" class="/downloads/image/20121222/001.jpg" title="/downloads/image/20121222/001.jpg">

请及时发布一下img tag的用法吧。

Link layout in single post

Enviroment:

  • hexo 0.1.4
  • light commit 8960b7d749

How to reproduce

  1. setup a "link" post ("layout: link" & "link: http://xxx.com")
  2. generate the site
  3. navigate to the link post's own permalink(not the external url).

Problem

The link post's single post page is not rendered properly:

http://cl.ly/Krm5

scripts功能

按照文档添加了自动打开newpost的功能,但是报错。

hexo new_post 'test'
Post created at /Users/pharaohnie/hexo/source/_posts/2013-01-07-test.md

/Users/pharaohnie/hexo/scripts/autoopen:4
    spawn('open', [target]);
                   ^
ReferenceError: target is not defined
    at EventEmitter.<anonymous> (/Users/pharaohnie/hexo/scripts/autoopen:4:20)
    at EventEmitter.emit (events.js:96:17)
    at /usr/local/share/npm/lib/node_modules/hexo/lib/cli/new.js:46:14
    at fs.close (/usr/local/share/npm/lib/node_modules/hexo/node_modules/graceful-fs/graceful-fs.js:90:5)
    at Object.oncomplete (fs.js:297:15)

Make swig optional for certain files?

I understand that swig is required for tag plugins as added in eb9f0c7. However, when my markdown document contains barely:

   {{\foo}}

(I happened to have something like this in one of my blog post about TeX, in which { and \ are used quite often, but note that I put this code block in a 4 spaces indention which means the Markdown processor should output that code block as is)

It will trigger the following error:

if ((typeof _context !== "undefined" && typeof _context.\foo !== "undefined")
                                                          ^
SyntaxError: Unexpected token ILLEGAL
    at Object.Function (unknown source)
    at createRenderFunc (/usr/local/share/npm/lib/node_modules/hexo/node_modules/swig/lib/swig.js:45:10)
    at createTemplate (/usr/local/share/npm/lib/node_modules/hexo/node_modules/swig/lib/swig.js:97:14)
    at getTemplate (/usr/local/share/npm/lib/node_modules/hexo/node_modules/swig/lib/swig.js:125:20)
    at Object.exports.compile (/usr/local/share/npm/lib/node_modules/hexo/node_modules/swig/lib/swig.js:187:14)
    at load (/usr/local/share/npm/lib/node_modules/hexo/lib/processor/load.js:68:25)
    at _asyncMap (/usr/local/share/npm/lib/node_modules/hexo/node_modules/async/lib/async.js:190:13)
    at async.forEach (/usr/local/share/npm/lib/node_modules/hexo/node_modules/async/lib/async.js:94:25)
    at _asyncMap (/usr/local/share/npm/lib/node_modules/hexo/node_modules/async/lib/async.js:187:17)
    at async.parallel.results (/usr/local/share/npm/lib/node_modules/hexo/node_modules/async/lib/async.js:459:34)

Because swig incorrectly considered \foo as a variable but it's not. Similar problem can happen to any code block with {{}}.

My question is: how do we input a code block with {{}}? I guess we should either escape it before sending to swig.compile() or allow to turn swig off for document like this. Any idea?

Clear public directory error?

After upgrade to 0.1.11, it will throw error when I try to hexo generate

Installing theme.
Clearing.

/home/ferrari/.nvm/v0.8.8/lib/node_modules/hexo/lib/cli/generate.js:176
if (err) throw err;
^
Error: ENOTEMPTY, rmdir '/home/ferrari/Programming/blogging/ferrari/public/tags'

Seem there're error when it try to delete directory which still have files inside (async problems?)
I just go to public and delete everything manually then generate will work.

Support for per-post permalink setting

In Octopress a permalink will be used when it is defined in a post's YAML front matter and the system-wide setting will be omitted, which could be helpful for those who transferred from other platform such as wordpress, since there's no redirecting method in github.

Source posts organization

currently there's no any proper way to organize posts except categorize them into separated folders, but then Hexo'll treat them as categories. Is there any better way to do so especially ppl who have hundreds or even thousands of posts?

Error on initiation of hexo project ind Windows

Hi,
It maybe something really simple but then I am trying to start a new hexo project I get this:

C:\Users\me\AppData\Roaming\npm\node_modules\hexo\lib\route.js:7
sepre = new RegExp(sep, 'g');
^
SyntaxError: Invalid regular expression: //: \ at end of pattern
at new RegExp (unknown source)
at Object. (C:\Users\me\AppData\Roaming\npm\node_modules\hex
o\lib\route.js:7:11)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object. (C:\Users\me\AppData\Roaming\npm\node_modules\hex
o\lib\cli\generate.js:2:11)
at Module._compile (module.js:449:26)

[CLI] integrate "generate" into "deploy"

instead of reminding one to do so:

"console.log('You should use %s to generate files first.', clc.bold('hexo generate'));"

I suggest we have it taken care of in "deploy".

windows 7下generate出错

安装完成后,运行hexo generate,提示value undefined,明天早上贴代码,现在是手机上发issue

QQ 20130108090941

升级到0.3.1后generate报错

已经升级到0.3.1,从octopress迁移过来,照片很多,4000多个,在generate的时候报错,信息如下:

Loading.
Generating.

undefined:24
  throw err;
        ^
Error: ejs:1
 >> 1| <%- partial('_partial/head') %>
    2| 
    3| <body>
    4|   <header id="header" class="inner"><%- partial('_partial/header') %></header>

EMFILE, too many open files '/Users/pharaohnie/hexo/themes/light/layout/_partial/head.ejs'
    at Object.fs.openSync (fs.js:338:18)
    at Object.fs.openSync (/usr/local/share/npm/lib/node_modules/hexo/node_modules/graceful-fs/graceful-fs.js:68:26)
    at Object.fs.readFileSync (fs.js:182:15)
    at Object.exports.readSync (/usr/local/share/npm/lib/node_modules/hexo/lib/util/file.js:114:19)
    at Object.render [as partial] (/usr/local/share/npm/lib/node_modules/hexo/lib/helper/partial.js:21:26)
    at eval (eval at <anonymous> (/usr/local/share/npm/lib/node_modules/hexo/node_modules/ejs/lib/ejs.js:234:12))
    at exports.compile (/usr/local/share/npm/lib/node_modules/hexo/node_modules/ejs/lib/ejs.js:239:15)
    at Object.exports.render (/usr/local/share/npm/lib/node_modules/hexo/node_modules/ejs/lib/ejs.js:277:13)
    at Object.ejs (/usr/local/share/npm/lib/node_modules/hexo/lib/renderer/ejs.js:7:14)
    at exports.renderSync (/usr/local/share/npm/lib/node_modules/hexo/lib/render.js:32:27)

generate页面生成不全

刚开始尝试Hexo,仅仅是执行:
npm install hexo -g
hexo init testblog
cd testblog
hexo generate
hexo server

执行上述命令均未报错。
但打开浏览器浏览发现站点页面元素不全。查看源代码发现文件头部写着layout: default,而后只有一个article标签包裹的内容。故猜测是根据theme生成页面的时候没有生成完全。

运行环境:
Windows 7 64bit
Node.js v0.8.16
Hexo 0.2.1

changelog

能否每次更新的时候写一下changelog,这样可以知道每次有什么新特性。

再有就是文档需要更新一下啦。

btw:hexo越来越好用了,我的几百篇blog,之前generate的时间在16s-20左右,更新0.4.1后,generate的时间在10s左右。

生成Tag错误问题

当出现大小写的时候,大写的Tag和小写Tag分开了,但是其中一个URL错误,另外一个计数错误。
请参看我的两个 Apple Tag:
http://woooh.com/

建议:全部强制小写

generate时报错

hexo version:0.2.1
os:osx 10.8.2

init之后,只留了一篇hello world。之后把原来octopress中存放照片的目录download拷贝到hexo/source/中,再generate就报错了,错误如下:

hexo$ hexo generate
Installing theme.
Clearing.
Loading source files.

stream.js:81
throw er; // Unhandled stream error in pipe.
^
Error: EMFILE, open '/Users/pharaohnie/hexo/source/downloads/image/20100214-fireworks/20100214121630_img_4179.jpg'

new_post的文件名问题

在new_post后,文件名就是文章的名字,能否在文章名字前加上日期,要不文章多了找起来很麻烦。

"post" as default layout

Suggest to remove the 'layout: post` from generated new post's metadata section & make it as default setting while page remains the same.

Running hexo locally

I want to just npm install hexo and run hexo commands but when I do this, I get:

-bash: hexo: command not found

How can I run hexo without installing it globally?

merge "setup_deploy" & "deploy" into "deploy"

To simplify the deployment process, I suggest to integrate "setup_deploy" into "deploy".
If one really need to run the setup process only, option should be more appropriate like "hexo deploy --setup".

Scanner Error?

從0.1.11版升到2.0時在generate開始就出現了這個錯誤,想請問是什麼情況?

/Users/<user name>/nvm/v0.8.14/lib/node_modules/hexo/node_modules/js-yaml/lib/js-yaml/scanner.js:352
  throw new ScannerError("while scanning for the next token", null,

ScannerError: 

後來試了setup deploy, generate, deploy 都會出現上述的錯誤,連直接打hexo都是啊

Error when trying to init a new project

~$ hexo init test

/Users/Lucifr/nvm/v0.8.14/lib/node_modules/hexo/lib/generator/index.js:2
  config = hexo.config.exclude_generator,
                      ^
TypeError: Cannot read property 'exclude_generator' of null
    at Object.<anonymous> (/Users/Lucifr/nvm/v0.8.14/lib/node_modules/hexo/lib/generator/index.js:2:23)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at module.exports (/Users/Lucifr/nvm/v0.8.14/lib/node_modules/hexo/lib/config.js:39:5)
    at _asyncMap (/Users/Lucifr/nvm/v0.8.14/lib/node_modules/hexo/node_modules/async/lib/async.js:190:13)
    at async.forEach (/Users/Lucifr/nvm/v0.8.14/lib/node_modules/hexo/node_modules/async/lib/async.js:94:25)

hexo server Error: TypeError: Cannot read property 'logger' of null

環境:
hexo 0.3.2
node v0.8.16
npm 1.1.70
ubuntu 11.04 Server

$ hexo server

/home/lue/.nvm/v0.8.16/lib/node_modules/hexo/lib/cli/server.js:9
  if (config.logger){
            ^
TypeError: Cannot read property 'logger' of null
    at Object.server (/home/lue/.nvm/v0.8.16/lib/node_modules/hexo/lib/cli/server.js:9:13)
    at module.exports (/home/lue/.nvm/v0.8.16/lib/node_modules/hexo/lib/console.js:57:20)
    at _asyncMap (/home/lue/.nvm/v0.8.16/lib/node_modules/hexo/node_modules/async/lib/async.js:190:13)
    at async.forEachSeries.iterate (/home/lue/.nvm/v0.8.16/lib/node_modules/hexo/node_modules/async/lib/async.js:116:25)
    at _asyncMap (/home/lue/.nvm/v0.8.16/lib/node_modules/hexo/node_modules/async/lib/async.js:187:17)
    at async.series.results (/home/lue/.nvm/v0.8.16/lib/node_modules/hexo/node_modules/async/lib/async.js:491:34)
    at module.exports (/home/lue/.nvm/v0.8.16/lib/node_modules/hexo/lib/loader.js:7:28)
    at /home/lue/.nvm/v0.8.16/lib/node_modules/hexo/lib/console.js:12:31
    at async.series.results (/home/lue/.nvm/v0.8.16/lib/node_modules/hexo/node_modules/async/lib/async.js:486:21)
    at _asyncMap (/home/lue/.nvm/v0.8.16/lib/node_modules/hexo/node_modules/async/lib/async.js:185:13)

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.