-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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.json
only stores original file contents. - New util: escape
- New methods for YAML Front Matter:
parse
,stringify
- Added
original_content
property to post/page model. - Theme config inherits root config (#235)
- Only load plugins whose name is
hexo-
prefixed. (#234)
- Suffix
archive_dir
only if non-empty (#237)
- file2.watch
- Modified match rule of
is_current
helper. - 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
path
to 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
delete
option 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.get
is 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.
-
create
is renamed topost.create
-
process
is renamed topost.process
-
Added
post.load
-
Added
post.render
-
Warehouse is updated to 0.1
- More powerful query: Added logical operators
$or
,$and
,$nor
and$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
-
_id
uses random ID instead. - Removed
post.ctime
,post.mtime
. - Removed
page.ctime
,page.mtime
. - Renamed
post.full_path
topost.full_source
. - Renamed
page.full_path
topage.full_path
. - Renamed
post.original_content
topost.raw
. - Renamed
page.original_content
topage.raw
. - Added
category.parent
.
-
-
Added support for absolute path to
render.renderFile
& partial helper -
Template data changed
- Archive layout (archive: 1):
page
is 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.join
instead - Filter: external link
- Tag: Blockquote URL truncate
- Helper: format
- Displays os information in
hexo version
- Dumps log file when error occurred
- Added
processor.format
method - Replaced
file2.watch
with 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/