-
Notifications
You must be signed in to change notification settings - Fork 48
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
0 parents
commit 5023226
Showing
259 changed files
with
16,696 additions
and
0 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,7 @@ | ||
.DS_Store | ||
.idea/ | ||
node_modules/ | ||
*.log | ||
db.json | ||
public/ | ||
.deploy*/ |
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,44 @@ | ||
language: node_js | ||
|
||
sudo: false | ||
|
||
node_js: | ||
- "0.12" | ||
|
||
cache: | ||
apt: true | ||
directories: | ||
- node_modules | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- graphicsmagick | ||
ssh_known_hosts: github.com | ||
|
||
before_install: | ||
# Decrypt the private key | ||
- openssl aes-256-cbc -K $encrypted_06b8e90ac19b_key -iv $encrypted_06b8e90ac19b_iv -in .travis/ssh_key.enc -out ~/.ssh/id_rsa -d | ||
# Set the permission of the key | ||
- chmod 600 ~/.ssh/id_rsa | ||
# Start SSH agent | ||
- eval $(ssh-agent) | ||
# Add the private key to the system | ||
- ssh-add ~/.ssh/id_rsa | ||
# Copy SSH config | ||
- cp .travis/ssh_config ~/.ssh/config | ||
# Set Git config | ||
- git config --global user.name "Hexo Bot" | ||
- git config --global user.email [email protected] | ||
# Clone the repository | ||
- git clone https://github.com/hexojs/hexojs.github.io .deploy_git | ||
|
||
install: | ||
- npm install --no-optional | ||
|
||
script: | ||
- npm run build && hexo deploy | ||
|
||
branches: | ||
only: | ||
- master |
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 @@ | ||
Host github.com | ||
User git | ||
StrictHostKeyChecking no | ||
IdentityFile ~/.ssh/id_rsa | ||
IdentitiesOnly yes |
Binary file not shown.
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,7 @@ | ||
Copyright (c) 2013 Tommy Chen | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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,40 @@ | ||
# Hexo Website | ||
|
||
[](https://travis-ci.org/hexojs/site) | ||
|
||
The website for Hexo. You can see the generated files at [hexojs/hexojs.github.io](https://github.com/hexojs/hexojs.github.io) repository. | ||
|
||
## Getting started | ||
|
||
Install dependencies: | ||
|
||
``` bash | ||
$ git clone https://github.com/hexojs/site.git | ||
$ cd site | ||
$ npm install | ||
``` | ||
|
||
Generate: | ||
|
||
``` bash | ||
$ hexo generate | ||
``` | ||
|
||
Run server: | ||
|
||
``` bash | ||
$ hexo server | ||
``` | ||
|
||
## Contributors | ||
|
||
- English - [tommy351] | ||
- 正體中文 - [tommy351] | ||
- 简体中文 - [pinggod] | ||
|
||
## License | ||
|
||
[CC BY 4.0](http://creativecommons.org/licenses/by/4.0/) | ||
|
||
[tommy351]: https://github.com/tommy351 | ||
[pinggod]: https://github.com/pinggod |
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,33 @@ | ||
title: O2 - Full Stack Your MAC | ||
subtitle: "Full Stack Your MAC - 全栈开发工程师MAC装`鸡`指南" | ||
description: "Best installation guide for full-stack developer using MAC OS! 全栈开发工程师MAC装机不完全手册" | ||
author: LV&天哥 | ||
language: zh-cn | ||
timezone: UTC | ||
url: http://o2team.com/mac | ||
root: / | ||
permalink: news/:year/:month/:day/:title/ | ||
archive_dir: news | ||
code_dir: downloads/code | ||
new_post_name: :year-:month-:day-:title.md # File name of new posts | ||
post_asset_folder: true | ||
highlight: | ||
enable: true | ||
line_number: false | ||
per_page: 0 | ||
|
||
theme: navy | ||
deploy: | ||
type: git | ||
repo: [email protected]:o2team/mac.git | ||
branch: gh-pages | ||
|
||
disqus_shortname: o2team | ||
google_analytics: UA-4910098-10 | ||
fb_admins: 100000247608790 | ||
swiftype_key: EwN4HMy_KMxTK_GMjV1z | ||
twitter: o2circle | ||
github: o2team/mac | ||
gh: | ||
user: o2team | ||
repo: mac |
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,90 @@ | ||
'use strict'; | ||
|
||
var gulp = require('gulp'); | ||
var $ = require('gulp-load-plugins')(); | ||
var cssnano = require('cssnano'); | ||
|
||
var htmlMinifierOptions = { | ||
removeComments: true, | ||
collapseWhitespace: true, | ||
collapseBooleanAttributes: true, | ||
removeScriptTypeAttributes: true, | ||
removeStyleLinkTypeAttributes: true, | ||
removeOptionalTags: true, | ||
minifyJS: true, | ||
minifyCSS: true | ||
}; | ||
|
||
var dirs = { | ||
public: 'public', | ||
screenshots: 'public/build/screenshots' | ||
}; | ||
|
||
gulp.task('useref', function(){ | ||
var assets = $.useref.assets({ | ||
searchPath: 'public' | ||
}); | ||
|
||
return gulp.src('public/**/*.html') | ||
.pipe(assets) | ||
.pipe($.if('*.css', $.postcss([ | ||
cssnano() | ||
]))) | ||
.pipe($.if('*.css', $.minifyCss())) | ||
.pipe($.if('*.js', $.uglify())) | ||
.pipe($.rev()) | ||
.pipe(assets.restore()) | ||
.pipe($.useref()) | ||
.pipe($.revReplace({ | ||
prefix: '/' | ||
})) | ||
.pipe($.if('*.html', $.htmlMinifier(htmlMinifierOptions))) | ||
.pipe(gulp.dest('public')); | ||
}); | ||
|
||
gulp.task('screenshot:rev', function(){ | ||
return gulp.src('public/themes/screenshots/*.png') | ||
.pipe($.rev()) | ||
.pipe(gulp.dest(dirs.screenshots)) | ||
.pipe($.rev.manifest()) | ||
.pipe(gulp.dest(dirs.screenshots)); | ||
}); | ||
|
||
gulp.task('screenshot:resize', ['screenshot:rev'], function(){ | ||
var resizeOptions = { | ||
width: 400, | ||
height: 250, | ||
crop: true | ||
}; | ||
|
||
return gulp.src('public/build/screenshots/*.png') | ||
// Append "@2x" to the original images | ||
.pipe($.rename({ | ||
suffix: '@2x' | ||
})) | ||
// Copy original images | ||
.pipe(gulp.dest(dirs.screenshots)) | ||
// Resize images | ||
.pipe($.imageResize(resizeOptions)) | ||
// Remove "@2x" in filename | ||
.pipe($.rename(function(path){ | ||
path.basename = path.basename.replace('@2x', ''); | ||
return path; | ||
})) | ||
// Save resized images | ||
.pipe(gulp.dest(dirs.screenshots)); | ||
}); | ||
|
||
gulp.task('screenshot:revreplace', ['screenshot:rev'], function(){ | ||
return gulp.src([dirs.screenshots + '/rev-manifest.json', 'public/themes/index.html']) | ||
.pipe($.revCollector({ | ||
replaceReved: true, | ||
dirReplacements: { | ||
'/themes/screenshots': '/build/screenshots' | ||
} | ||
})) | ||
.pipe(gulp.dest('public/themes')); | ||
}); | ||
|
||
gulp.task('screenshot', ['screenshot:rev', 'screenshot:resize', 'screenshot:revreplace']); | ||
gulp.task('default', ['useref', 'screenshot']); |
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,45 @@ | ||
{ | ||
"name": "hexo-site", | ||
"version": "0.0.0", | ||
"private": true, | ||
"hexo": { | ||
"version": "3.1.1" | ||
}, | ||
"scripts": { | ||
"build": "hexo generate && gulp" | ||
}, | ||
"dependencies": { | ||
"cheerio": "^0.18.0", | ||
"hexo": "^3.1.1", | ||
"hexo-deployer-git": "0.0.4", | ||
"hexo-generator-archive": "^0.1.3", | ||
"hexo-generator-feed": "^1.0.0", | ||
"hexo-generator-sitemap": "^1.0.0", | ||
"hexo-renderer-jade": "^0.1.0", | ||
"hexo-renderer-marked": "^0.2.3", | ||
"hexo-renderer-stylus": "^0.2.0", | ||
"hexo-server": "^0.1.1", | ||
"lodash": "^3.0.0", | ||
"lunr": "^0.5.7" | ||
}, | ||
"devDependencies": { | ||
"cssnano": "^2.1.0", | ||
"gulp": "^3.8.11", | ||
"gulp-html-minifier": "^0.1.6", | ||
"gulp-if": "^1.2.5", | ||
"gulp-image-resize": "^0.6.0", | ||
"gulp-load-plugins": "^0.8.0", | ||
"gulp-minify-css": "^0.4.6", | ||
"gulp-minify-html": "^1.0.0", | ||
"gulp-postcss": "^4.0.3", | ||
"gulp-rename": "^1.2.0", | ||
"gulp-rev": "^3.0.1", | ||
"gulp-rev-collector": "^0.1.4", | ||
"gulp-rev-replace": "^0.4.0", | ||
"gulp-uglify": "^1.1.0", | ||
"gulp-useref": "^1.1.1" | ||
}, | ||
"optionalDependencies": { | ||
"hexo-browsersync": "^0.1.0" | ||
} | ||
} |
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,2 @@ | ||
title: {{ title }} | ||
--- |
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,2 @@ | ||
title: {{ title }} | ||
--- |
Oops, something went wrong.