A set of basic page generators for Hexo, with multi-language supported. Includes variant of modules below:
$ npm install hexo-generator-basic-set --save
_config.yml
languages
.new_post_name
with :lang/
permalink
with :lang/
hexo new <layout> <title> --lang <your language>
Note: It's not recommended to use date as a part of permalink
, for you may write a post in two language in different date, change only the language part in url doesn't help you make a correct switch.
Each generator has its own configuration(like its original version). The configurations are listed below:
# Pagination
## Set per_page to 0 to disable pagination
pagination_dir: page
## This parameter is used as default value
## if "per_page" is not presented in the respective configuration
per_page: 4
index_generator:
per_page: 5
order_by: -date
archive_generator:
per_page: 3
yearly: true
monthly: true
daily: false
category_generator:
per_page: 5
tag_generator:
per_page: 5
enable_index_page: false
Generators can be easily disabled by removing the corresponding configurations from _config.yml
.
hexo g
Note: No sub-folders will be created if you leave languages
unfilled or just assign one language, an index.html will be generated under public/
, just like the original one does. Config in this way if you don't want a multi-language blog.
_config.yml
.MIT
Thanks to tommy351's original works.