Skip to content

Commit

Permalink
Remove useless comments in index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy351 committed Dec 27, 2015
1 parent 11a48d3 commit 237736e
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,47 +1,3 @@
/*
var url = require('url');
hexo.extend.generator.register('alias', function(locals){
var route = hexo.route,
config = hexo.config,
routes = [];
var template = function(path){
path = url.parse(path).protocol ? path : config.root + route.format(path);
path = path.replace(/index\.html$/, "");
return [
'<!DOCTYPE html>',
'<html>',
'<head>',
'<meta charset="utf-8">',
'<title>Redirecting...</title>',
'<link rel="canonical" href="' + path + '">',
'<meta http-equiv="refresh" content="0; url=' + path + '">',
'</head>',
'</html>'
].join('');
};
[].concat(locals.posts.toArray(), locals.pages.toArray()).forEach(function(item){
if (!item.alias && !item.aliases) return;
var aliases = item.alias || item.aliases;
if (!Array.isArray(aliases)) aliases = [aliases];
aliases.forEach(function(alias){
routes.push({path:alias, data:template(item.path)});
});
});
var aliasConfig = config.alias;
for (var i in aliasConfig){
routes.push({path:i, data:template(aliasConfig[i])});
}
return routes;
});*/
/* global hexo */

'use strict';
Expand Down

0 comments on commit 237736e

Please sign in to comment.