Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

hexo-generator-alias

Build Status NPM version Coverage Status

Generates alias pages for redirecting to posts, pages or URL.

Install

$ npm install hexo-generator-alias --save
  • Hexo 3 & 4: >= 1.0
  • Hexo 2: 0.1.x

Usage

You can specify aliases in _config.yml:

alias:
  api/index.html: api/classes/Hexo.html
  plugins/index.html: https://github.com/tommy351/hexo/wiki/Plugins

In the above example, when you access http://yoursite.com/api/, you will be redirected to http://yoursite.com/api/classes/Hexo.html

You could also configure it in your post and page files:

source/cv/index.md
---
title: some title
date: some date
+ alias: about/index.html

+ alias:
+ - foo/index.html
+ - bar/index.html
---

In the above example, when you access http://yoursite.com/about/, you will be redirected to http://yoursite.com/cv/

You could also configure multiple aliases. So in the second example,

About

Generate alias pages for redirecting to posts, pages or URL

Resources

License

Releases

No releases published
You can’t perform that action at this time.