Skip to content
Snippets Groups Projects
Commit ed38be65 authored by Tommy Chen's avatar Tommy Chen
Browse files

Remove API docs temporarily

Update helpers
Add travis.yml
parent 2d98a655
No related branches found
No related tags found
No related merge requests found
.DS_Store .DS_Store
node_modules node_modules/
public tmp/
.deploy *.log
db.json .idea/
debug.log coverage/
tmp db.json
\ No newline at end of file \ No newline at end of file
language: node_js
node_js:
- "0.10"
before_install:
- openssl aes-256-cbc -K $encrypted_06b8e90ac19b_key -iv $encrypted_06b8e90ac19b_iv
-in hexo_site_key.enc -out hexo_site_key -d
- mv hexo_site_key ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- git config --global user.name "Tommy Chen"
- git config --global user.email tommy351@gmail.com
- npm install hexo@beta -g
- git clone https://github.com/hexojs/hexojs.github.io .deploy
script:
- hexo generate
- hexo deploy
\ No newline at end of file
# Hexo Website # Hexo Website
[![Build Status](https://travis-ci.org/hexojs/site.svg)](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. 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 ## Getting started
...@@ -15,7 +17,6 @@ $ npm install ...@@ -15,7 +17,6 @@ $ npm install
Generate: Generate:
``` bash ``` bash
$ gulp
$ hexo generate $ hexo generate
``` ```
...@@ -23,18 +24,4 @@ Run server: ...@@ -23,18 +24,4 @@ Run server:
``` bash ``` bash
$ hexo server $ hexo server
``` ```
\ No newline at end of file
## Requirements
- [Hexo](http://hexo.io/)
``` bash
$ npm install hexo -g
```
- [Gulp](http://gulpjs.com/)
``` bash
$ npm install gulp -g
```
\ No newline at end of file
# Hexo Configuration
## Docs: http://hexo.io/docs/configuration.html
## Source: https://github.com/tommy351/hexo/
# Site
title: Hexo title: Hexo
subtitle: Hexo is a fast, simple & powerful blog framework powered by Node.js. subtitle: "A fast, simple & powerful blog framework powered by Node.js."
description: Hexo is a fast, simple & powerful blog framework powered by Node.js. description: "Hexo is a fast, simple & powerful blog framework powered by Node.js."
author: SkyArrow
email: tommy351@gmail.com
language:
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://hexo.io url: http://hexo.io
root: / root: /
permalink: news/:year/:month/:day/:title/ permalink: news/:year/:month/:day/:title/
tag_dir: tags
archive_dir: news archive_dir: news
category_dir: categories
code_dir: downloads/code code_dir: downloads/code
# Directory
source_dir: source
public_dir: public
# Writing
new_post_name: :year-:month-:day-:title.md # File name of new posts new_post_name: :year-:month-:day-:title.md # File name of new posts
default_layout: post
auto_spacing: false # Add spaces between asian characters and western characters
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
max_open_file: 100
multi_thread: true
filename_case: 0
render_drafts: false
post_asset_folder: true post_asset_folder: true
relative_link: false
highlight: highlight:
enable: true enable: true
line_number: false line_number: false
tab_replace:
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Archives
# 2: Paginate result
# 1: Display result in same page
archive: 2
category: 2
tag: 2
# Server
## Hexo uses Connect as a server
## You can customize the logger format as defined in
## http://www.senchalabs.org/connect/logger.html
port: 4000
server_ip: 0.0.0.0
logger: false
logger_format:
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: MMM D YYYY
time_format: H:mm:ss
# Pagination
## Set per_page to 0 to disable pagination
per_page: 0 per_page: 0
pagination_dir: page
# Disqus
disqus_shortname: hexojs disqus_shortname: hexojs
# Extensions
## Plugins: https://github.com/tommy351/hexo/wiki/Plugins
## Themes: https://github.com/tommy351/hexo/wiki/Themes
theme: hexo3 theme: hexo3
exclude_generator:
- home
# Deployment
## Docs: http://hexo.io/docs/deployment.html
deploy: deploy:
type: github type: git
repo: https://github.com/hexojs/hexojs.github.io.git repo: https://github.com/hexojs/hexojs.github.io
branch: auto-deploy-test
\ No newline at end of file
var gulp = require('gulp'),
yuidoc = require('gulp-yuidoc'),
clean = require('gulp-clean'),
shell = require('gulp-shell'),
rename = require('gulp-rename');
gulp.task('clean-hexo', function(){
return gulp.src('tmp/hexo/', {read: false})
.pipe(clean());
});
gulp.task('clean-warehouse', function(){
return gulp.src('tmp/warehouse/', {read: false})
.pipe(clean());
});
gulp.task('clean-yuidoc', function(){
return gulp.src('source/_yuidoc/', {read: false})
.pipe(clean());
});
gulp.task('clean', ['clean-hexo', 'clean-warehouse', 'clean-yuidoc']);
gulp.task('clone-hexo', ['clean-hexo'], shell.task(['git clone https://github.com/tommy351/hexo.git -b dev tmp/hexo']));
gulp.task('clone-warehouse', ['clean-warehouse'], shell.task(['git clone https://github.com/tommy351/warehouse.git -b develop tmp/warehouse']));
gulp.task('clone', ['clone-hexo', 'clone-warehouse']);
gulp.task('yuidoc-hexo', ['clone-hexo'], function(){
return gulp.src('tmp/hexo/lib/**/*.js')
.pipe(yuidoc.parser({
project: require('./tmp/hexo/package.json')
}))
.pipe(rename('index.json'))
.pipe(gulp.dest('source/_yuidoc/'));
});
gulp.task('yuidoc-warehouse', ['clone-warehouse'], function(){
return gulp.src('tmp/warehouse/lib/**/*.js')
.pipe(yuidoc.parser({
project: require('./tmp/warehouse/package.json')
}))
.pipe(rename('warehouse.json'))
.pipe(gulp.dest('source/_yuidoc/'));
});
gulp.task('yuidoc', ['yuidoc-hexo', 'yuidoc-warehouse']);
gulp.task('default', ['yuidoc'], function(){
return gulp.start('clean-hexo', 'clean-warehouse');
});
\ No newline at end of file
File added
{ {
"name": "hexo", "name": "hexo",
"version": "2.8.3", "version": "3.0.0-beta.2",
"private": true, "private": true,
"dependencies": { "dependencies": {
"hexo-deployer-git": "0.0.2",
"hexo-generator-archive": "0.0.2",
"hexo-generator-feed": "^1.0.0",
"hexo-generator-sitemap": "^1.0.0",
"hexo-renderer-ejs": "^0.1.0", "hexo-renderer-ejs": "^0.1.0",
"hexo-renderer-marked": "^0.1.0",
"hexo-renderer-stylus": "^0.1.0",
"hexo-renderer-jade": "^0.1.0", "hexo-renderer-jade": "^0.1.0",
"hexo-yuidoc": "^0.2.2", "hexo-renderer-marked": "^0.2.3",
"hexo-generator-sitemap": "^0.2.0", "hexo-renderer-stylus": "^0.1.0",
"hexo-generator-feed": "^0.2.0" "hexo-server": "0.0.4"
},
"devDependencies": {
"gulp": "^3.6.2",
"gulp-clean": "^0.2.4",
"gulp-yuidoc": "^0.1.2",
"gulp-shell": "^0.2.4",
"gulp-rename": "^1.2.0"
} }
} }
\ No newline at end of file
var links = {
index: 'https://github.com/tommy351/hexo',
warehouse: 'https://github.com/tommy351/warehouse'
};
hexo.extend.helper.register('github_link', function(data){
var match = data.file.match(/(\w+)\/lib\/(.+)/),
name = match[1],
path = 'lib/' + match[2];
if (name === 'hexo') name = 'index';
var line = data.line,
version = this.site.yuidoc.findByName(name).project.version || 'master';
return '<a href="' + links[name] + '/blob/' + version + '/' + path + '#L' + line + '">' + path + ':' + line + '</a>';
});
hexo.extend.helper.register('item_flags', function(data){
var result = '';
['static', 'chainable', 'async', 'final'].forEach(function(i){
if (data[i]) result += '<span class="api-item-flag ' + i + '">' + i + '</span>';
});
return result;
});
hexo.extend.helper.register('page_nav', function(){
var sidebar = this.theme.doc_sidebar,
path = this.path.replace(/^docs\//, ''),
list = {};
for (var i in sidebar){
for (var j in sidebar[i]){
list[sidebar[i][j]] = j;
}
}
var keys = Object.keys(list),
index = keys.indexOf(path),
result = [];
if (index > 0){
result.push('<a href="' + keys[index - 1] + '" id="page-footer-prev" title="' + list[keys[index - 1]] + '">Prev</a>');
}
if (index < keys.length - 1){
result.push('<a href="' + keys[index + 1] + '" id="page-footer-next" title="' + list[keys[index + 1]] + '">Next</a>');
}
return result.join('');
});
\ No newline at end of file
hexo.extend.tag.register('note', function(args, content){ hexo.extend.tag.register('note', function(args, content){
var className = args.shift(), var className = args.shift();
header = ''; var header = '';
var result = '';
if (args.length){ if (args.length){
header += '<strong class="note-title">' + args.join(' ') + '</strong>'; header += '<strong class="note-title">' + args.join(' ') + '</strong>';
} }
return [ result += '<blockquote>' + header;
'<escape><blockquote class="note ' + className + '">' + header + '</escape>', result += hexo.render.renderSync({text: content, engine: 'markdown'});
content, result += '</blockquote>';
'<escape></blockquote></escape>'
].join('\n\n') + '\n'; return result;
}, {ends: true, escape: false}); }, true);
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
This diff is collapsed.
menu: menu:
Docs: /docs/ Docs: /docs/
API: /api/classes/Hexo.html
News: /news/ News: /news/
Plugins: https://github.com/tommy351/hexo/wiki/Plugins Plugins: https://github.com/tommy351/hexo/wiki/Plugins
Themes: https://github.com/tommy351/hexo/wiki/Themes Themes: https://github.com/tommy351/hexo/wiki/Themes
......
...@@ -39,6 +39,11 @@ pre ...@@ -39,6 +39,11 @@ pre
color: highlight-foreground color: highlight-foreground
overflow: auto overflow: auto
margin: 0 margin: 0
table
margin: 0
border: 0
th, td
padding: 0
figcaption figcaption
clearfix() clearfix()
margin: -5px 0 5px margin: -5px 0 5px
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment