-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
271 changed files
with
22,987 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Hexo | ||
|
||
[![Build Status](https://travis-ci.org/hexojs/hexo.svg?branch=master)](https://travis-ci.org/hexojs/hexo) [![NPM version](https://badge.fury.io/js/hexo.svg)](http://badge.fury.io/js/hexo) [![Coverage Status](https://coveralls.io/repos/hexojs/hexo/badge.svg?branch=master)](https://coveralls.io/r/hexojs/hexo?branch=master) [![Build status](https://ci.appveyor.com/api/projects/status/hpx3lduqjj2t6uqq/branch/master?svg=true)](https://ci.appveyor.com/project/tommy351/hexo/branch/master) [![Gitter](https://badges.gitter.im/hexojs/hexo.svg)](https://gitter.im/hexojs/hexo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) | ||
|
||
A fast, simple & powerful blog framework, powered by [Node.js](http://nodejs.org). | ||
|
||
## Features | ||
|
||
- Blazing fast generating | ||
- Support for GitHub Flavored Markdown and most Octopress plugins | ||
- One-command deploy to GitHub Pages, Heroku, etc. | ||
- Powerful plugin system | ||
|
||
## Installation | ||
|
||
``` bash | ||
$ npm install hexo-cli -g | ||
``` | ||
|
||
## Quick Start | ||
|
||
**Setup your blog** | ||
|
||
``` bash | ||
$ hexo init blog | ||
$ cd blog | ||
``` | ||
|
||
**Start the server** | ||
|
||
``` bash | ||
$ hexo server | ||
``` | ||
|
||
**Create a new post** | ||
|
||
``` bash | ||
$ hexo new "Hello Hexo" | ||
``` | ||
|
||
**Generate static files** | ||
|
||
``` bash | ||
$ hexo generate | ||
``` | ||
|
||
## More Information | ||
|
||
- Read the [documentation](https://hexo.io/) | ||
- Find solutions in [troubleshooting](https://hexo.io/docs/troubleshooting.html) | ||
- Join discussion on [Google Group](https://groups.google.com/group/hexo) | ||
- See the [plugin list](https://hexo.io/plugins/) and the [theme list](https://hexo.io/themes/) on wiki | ||
- Follow [@hexojs](https://twitter.com/hexojs) for latest news | ||
|
||
## License | ||
|
||
MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Fix line endings in Windows. (runs before repo cloning) | ||
init: | ||
- git config --global core.autocrlf input | ||
|
||
# Test against these versions of Node.js. | ||
environment: | ||
matrix: | ||
- nodejs_version: "0.12" | ||
- nodejs_version: "4" | ||
- nodejs_version: "6" | ||
- nodejs_version: "7" | ||
|
||
matrix: | ||
fast_finish: true | ||
|
||
# Install scripts. (runs after repo cloning) | ||
install: | ||
- ps: Install-Product node $env:nodejs_version | ||
- npm install -g npm | ||
- npm install | ||
|
||
cache: | ||
- node_modules -> package.json | ||
|
||
# Post-install test scripts. | ||
test_script: | ||
# Output useful info for debugging. | ||
- node --version | ||
- npm --version | ||
# Run tests | ||
- npm test | ||
|
||
# Don't actually build. | ||
build: off | ||
|
||
# Set build version format here instead of in the admin panel. | ||
version: "{build}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env node | ||
|
||
'use strict'; | ||
|
||
require('hexo-cli')(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @Author: wh01am | ||
* @Contact: [email protected] | ||
* @Last Modified By: wh01am | ||
* @Last Modified Time: Apr 14, 2017 3:30 PM | ||
* @Last Modified Time: Apr 14, 2017 4:04 PM | ||
* @Description: jour cli | ||
*/ | ||
|
||
|
@@ -14,11 +14,11 @@ const arguments = require('minimist')(process.argv.slice(2)); // get cli argumen | |
|
||
function cli(cwd, args) { | ||
let cwd = cwd || process.cwd(); | ||
|
||
function handleError() { | ||
log.fatal(err); | ||
process.exit(2); | ||
} | ||
let log = | ||
function handleError(err) { | ||
log.fatal(err); | ||
process.exit(2); | ||
} | ||
|
||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
'use strict'; | ||
|
||
var fs = require('hexo-fs'); | ||
|
||
function File(data) { | ||
this.source = data.source; | ||
this.path = data.path; | ||
this.params = data.params; | ||
this.type = data.type; | ||
} | ||
|
||
File.prototype.read = function(options, callback) { | ||
return fs.readFile(this.source, options).asCallback(callback); | ||
}; | ||
|
||
File.prototype.readSync = function(options) { | ||
return fs.readFileSync(this.source, options); | ||
}; | ||
|
||
File.prototype.stat = function(options, callback) { | ||
if (!callback && typeof options === 'function') { | ||
callback = options; | ||
options = {}; | ||
} | ||
|
||
return fs.stat(this.source).asCallback(callback); | ||
}; | ||
|
||
File.prototype.statSync = function(options) { | ||
return fs.statSync(this.source); | ||
}; | ||
|
||
File.TYPE_CREATE = 'create'; | ||
File.TYPE_UPDATE = 'update'; | ||
File.TYPE_SKIP = 'skip'; | ||
File.TYPE_DELETE = 'delete'; | ||
|
||
module.exports = File; |
Oops, something went wrong.