-
-
Notifications
You must be signed in to change notification settings - Fork 5k
What's new in 2.0
uiolee edited this page Apr 7, 2024
·
2 revisions
- Multi-thread generate
- Added support for more GFM features (#222)
- Added link tag (#216)
- Added OpenShift DIY cartridge deployment. (#226)
- Added Warehouse support for Swig (#232)
- Logger
- Model
- file2
- Post create
- Swig extension (#233)
-
db.jsononly stores original file contents. - New util: escape
- New methods for YAML Front Matter:
parse,stringify - Added
original_contentproperty to post/page model. - Theme config inherits root config (#235)
- Only load plugins whose name is
hexo-prefixed. (#234)
- Suffix
archive_dironly if non-empty (#237)
- file2.watch
- Modified match rule of
is_currenthelper. - Added lodash (
_) to theme variable. - Display theme source file render error in console directly.
- Deleted all categories/tags before updating posts.
- Fixed
Error: Callback was already called. - Code block indent
- Open external links in new tab (#251)
- Added
pathto page variables - Prints Swig render error with file name
- CSS/JS helper: Prefix root URL to the path if it's not prefixed with
/or any protocol. Accept multi arguments. - Modified paginator helper
- Display uncaught exceptions with
log.error - Comments in JSDoc format
- Block quote tag plugin
- Modified "More" link to pass W3C validator (#250)
- Version console typo (#248)
- rsync deployer plugin: fixed
deleteoption bug (#245) - Replace post/page data instead of update after source file updated
Most of modules were refactored in 2.0.0-rc2. Some APIs were changed. After updating, you have to update the theme.
git clone git://github.com/tommy351/hexo-theme-light.git -b 2.0 themes/light
-
help command. Now you can use
hexo help <command>to get detailed information of a command. - 404/500 page
- Batch deploy (#267)
- Folder as category.
-
i18n
- Added support for sprintf
- Language fallback
- Usage of
i18n.getis changed. For example:
var locale = i18n.get("zh-tw"); locale(key);
- Added
i18n.plural. You can see the test files for example.
-
router
- Deleted
router.list - Deleted
router.clear
- Deleted
-
processor
- Added support for Backbone-style URL params.
-
createis renamed topost.create -
processis renamed topost.process -
Added
post.load -
Added
post.render -
Warehouse is updated to 0.1
- More powerful query: Added logical operators
$or,$and,$norand$not. - Nested query.
- Population.
- Custom type.
- More query and update operators.
- Pre/post save/remove hooks.
- Mongoose-style. For example:
var doc = Post.new({ title: "Hello World" }); doc.save();
- More powerful query: Added logical operators
-
logger
- Added
log.setLevel,log.setColor,log.setAlias,log.setHide,log.setDefault - Added
log.toString,log.trim,log.toJSON. - Removed
log.save,log.saveSync - Save log file in debug mode
- Added
-
Model
-
_iduses random ID instead. - Removed
post.ctime,post.mtime. - Removed
page.ctime,page.mtime. - Renamed
post.full_pathtopost.full_source. - Renamed
page.full_pathtopage.full_path. - Renamed
post.original_contenttopost.raw. - Renamed
page.original_contenttopage.raw. - Added
category.parent.
-
-
Added support for absolute path to
render.renderFile& partial helper -
Template data changed
- Archive layout (archive: 1):
pageis renamed topage.posts. (Example)
- Archive layout (archive: 1):
-
Get config in stylus file. For example: (#265)
#foo content: hexo-config('title')
-
Changed list console export style
- Use
path.joininstead - Filter: external link
- Tag: Blockquote URL truncate
- Helper: format
- Displays os information in
hexo version - Dumps log file when error occurred
- Added
processor.formatmethod - Replaced
file2.watchwith watch - Refactor logger
- Processor didn't work on Windows
- Log file can't be saved on Windows
- Deployer plugins
Caution
Attention! This wiki is no longer maintained.
Please visit the official website. https://hexo.io/
Caution
Attention! This wiki is no longer maintained.
Please visit the official website. https://hexo.io/