Skip to content

Commit

Permalink
Add plugins page
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy351 committed Feb 14, 2015
1 parent 33a15db commit f2925f9
Show file tree
Hide file tree
Showing 20 changed files with 511 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ before_install:
- git config --global user.name "Tommy Chen"
- git config --global user.email [email protected]
# Install Hexo
- npm install hexo@beta -g
- npm install hexo-cli -g
# Clone the repository
- git clone https://github.com/hexojs/hexojs.github.io .deploy
- git clone https://github.com/hexojs/hexojs.github.io .deploy_git

script:
- hexo generate
Expand Down
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,17 @@ 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
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "hexo-site",
"version": "3.0.0-rc.2",
"version": "0.0.0",
"private": true,
"hexo": {
"version": "3.0.0-rc.3"
"version": "3.0.0-rc.4"
},
"dependencies": {
"cheerio": "^0.18.0",
"hexo-browsersync": "0.0.2",
"hexo": "3.0.0-rc.4",
"hexo-browsersync": "^0.1.0",
"hexo-deployer-git": "0.0.3",
"hexo-generator-archive": "0.0.2",
"hexo-generator-feed": "^1.0.0",
Expand All @@ -17,6 +18,7 @@
"hexo-renderer-marked": "^0.2.3",
"hexo-renderer-stylus": "^0.2.0",
"hexo-server": "^0.1.1",
"lodash": "^3.0.0"
"lodash": "^3.0.0",
"lunr": "^0.5.7"
}
}
52 changes: 52 additions & 0 deletions scripts/helpers.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
'use strict';

var pathFn = require('path');
var _ = require('lodash');
var url = require('url');
var cheerio = require('cheerio');
var lunr = require('lunr');

var localizedPath = ['docs', 'api'];

Expand Down Expand Up @@ -113,3 +116,52 @@ hexo.extend.helper.register('page_anchor', function(str){

return $.html();
});

hexo.extend.helper.register('lunr_index', function(data){
var index = lunr(function(){
this.field('name', {boost: 10});
this.field('tags', {boost: 50});
this.field('description');
this.ref('id');
});

_.sortBy(data, 'name').forEach(function(item, i){
index.add(_.assign({id: i}, item));
});

return JSON.stringify(index.toJSON());
});

hexo.extend.helper.register('plugin_tag_cloud', function(data, options){
options = options || {};

var tags = {};

_.each(data, function(item){
_.each(item.tags, function(tag){
if (tags.hasOwnProperty(tag)){
tags[tag]++;
} else {
tags[tag] = 1;
}
});
});

var arr = [];

_.each(tags, function(length, name){
arr.push({
name: name,
length: length
});
});

var result = this.tag_cloud(arr, options);
var $ = cheerio.load(result, {decodeEntities: false});

$('a').each(function(){
$(this).attr('href', '#' + $(this).html());
});

return $.html();
});
2 changes: 2 additions & 0 deletions scripts/tags.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

hexo.extend.tag.register('note', function(args, content){
var className = args.shift();
var header = '';
Expand Down
File renamed without changes.
250 changes: 250 additions & 0 deletions source/_data/plugins.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
- name: hexo-server
description: Server module for Hexo.
link: https://github.com/hexojs/hexo-server
tags:
- official
- server
- console
- name: hexo-cli
description: Command line interface for Hexo.
link: https://github.com/hexojs/hexo-cli
tags:
- official
- console
- cli
- name: hexo-browsersync
description: BrowserSync plugin for Hexo.
link: https://github.com/hexojs/hexo-browsersync
tags:
- official
- browsersync
- server
- name: hexo-renderer-less
description: Less renderer for Hexo.
link: https://github.com/hexojs/hexo-renderer-less
tags:
- official
- renderer
- less
- style
- css
- name: hexo-generator-archive
description: Archive generator plugin for Hexo.
link: https://github.com/hexojs/hexo-generator-archive
tags:
- official
- generator
- archive
- name: hexo-generator-category
description: Category generator plugin for Hexo.
link: https://github.com/hexojs/hexo-generator-category
tags:
- official
- generator
- category
- name: hexo-generator-tag
description: Tag generator plugin for Hexo.
link: https://github.com/hexojs/hexo-generator-tag
tags:
- official
- generator
- tag
- name: hexo-generator-index
description: Index generator plugin for Hexo.
link: https://github.com/hexojs/hexo-generator-index
tags:
- official
- generator
- index
- name: hexo-renderer-marked
description: Markdown renderer for Hexo.
link: https://github.com/hexojs/hexo-renderer-marked
tags:
- official
- renderer
- markdown
- marked
- name: hexo-autoprefixer
description: Autoprefixer plugin for Hexo.
link: https://github.com/hexojs/hexo-autoprefixer
tags:
- official
- filter
- css
- autoprefixer
- name: hexo-clean-css
description: Minify CSS files with clean-css.
link: https://github.com/hexojs/hexo-clean-css
tags:
- official
- filter
- css
- cleancss
- minify
- name: hexo-html-minifier
description: Minify HTML files with HTMLMinifier.
link: https://github.com/hexojs/hexo-html-minifier
tags:
- official
- filter
- html
- minify
- name: hexo-uglify
description: Minify JavaScript files with UglifyJS.
link: https://github.com/hexojs/hexo-uglify
tags:
- official
- filter
- js
- uglify
- minify
- name: hexo-notify
description: Notification plugins for Hexo.
link: https://github.com/hexojs/hexo-notify
tags:
- official
- notify
- name: hexo-deployer-openshift
description: OpenShift deployer for Hexo.
link: https://github.com/hexojs/hexo-deployer-openshift
tags:
- official
- deployer
- openshift
- name: hexo-deployer-heroku
description: Heroku deployer for Hexo.
link: https://github.com/hexojs/hexo-deployer-heroku
tags:
- official
- deployer
- heroku
- name: hexo-deployer-git
description: Git deployer plugin for Hexo.
link: https://github.com/hexojs/hexo-deployer-git
tags:
- official
- deployer
- git
- name: hexo-deployer-rsync
description: Rsync deployer plugin for Hexo.
link: https://github.com/hexojs/hexo-deployer-rsync
tags:
- official
- deployer
- rsync
- name: hexo-generator-sitemap
description: Sitemap generator for Hexo.
link: https://github.com/hexojs/hexo-generator-sitemap
tags:
- official
- generator
- sitemap
- name: hexo-generator-feed
description: Feed generator for Hexo.
link: https://github.com/hexojs/hexo-generator-feed
tags:
- official
- generator
- feed
- rss
- name: hexo-renderer-stylus
description: Stylus renderer for Hexo.
link: https://github.com/hexojs/hexo-renderer-stylus
tags:
- official
- renderer
- css
- stylus
- name: hexo-filter-auto-spacing
description: Add spaces between CJK characters and western characters.
link: https://github.com/hexojs/hexo-filter-auto-spacing
tags:
- official
- filter
- spacing
- name: hexo-yuidoc
description: Generate YUIDoc with Hexo.
link: https://github.com/hexojs/hexo-yuidoc
tags:
- official
- generator
- yuidoc
- name: hexo-migrator-wordpress
description: WordPress migrator for Hexo.
link: https://github.com/hexojs/hexo-migrator-wordpress
tags:
- official
- migrator
- wordpress
- name: hexo-migrator-rss
description: RSS migrator for Hexo.
link: https://github.com/hexojs/hexo-migrator-rss
tags:
- official
- migrator
- rss
- name: hexo-renderer-ejs
description: EJS renderer for Hexo.
link: https://github.com/hexojs/hexo-renderer-ejs
tags:
- official
- renderer
- ejs
- name: hexo-renderer-jade
description: Jade renderer for Hexo.
link: https://github.com/hexojs/hexo-renderer-jade
tags:
- official
- renderer
- jade
- name: hexo-renderer-haml
description: Haml renderer for Hexo.
link: https://github.com/hexojs/hexo-renderer-haml
tags:
- official
- renderer
- haml
- name: hexo-renderer-dot
description: doT renderer for Hexo.
link: https://github.com/hexojs/hexo-renderer-dot
tags:
- official
- renderer
- dot
- name: hexo-renderer-coffeescript
description: CoffeeScript renderer for Hexo.
link: https://github.com/hexojs/hexo-renderer-coffeescript
tags:
- official
- renderer
- coffeescript
- coffee
- name: hexo-livereload
description: Livereload plugin for Hexo.
link: https://github.com/hexojs/hexo-livereload
tags:
- official
- server
- livereload
- name: hexo-generator-alias
description: "Generate alias pages for redirecting to post, pages or URL."
link: https://github.com/hexojs/hexo-generator-alias
tags:
- official
- generator
- alias
- redirect
- name: hexo-deployer-ftpsync
description: FTP deployer for Hexo.
link: https://github.com/hexojs/hexo-deployer-ftpsync
tags:
- official
- deployer
- ftp
- name: hexo-migrator-blogger
description: Blogger migrator for Hexo.
link: https://github.com/hexojs/hexo-migrator-blogger
tags:
- official
- migrator
- blogger
7 changes: 7 additions & 0 deletions source/_data/themes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- name: landscape
description: A brand new default theme for Hexo.
link: https://github.com/hexojs/hexo-theme-landscape
tags:
- official
- responsive
- widget
3 changes: 3 additions & 0 deletions source/plugins/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
layout: plugins
title: Plugins
---
Loading

0 comments on commit f2925f9

Please sign in to comment.