feat: add configs introduced in Hexo v4
- pretty_urls.trailing_index: https://github.com/hexojs/hexo/pull/3691 - external_link.enable: https://github.com/hexojs/hexo/pull/3675 - meta_generator: https://github.com/hexojs/hexo/pull/3653 - use_date_for_updated: https://github.com/hexojs/hexo/pull/3235
This commit is contained in:
parent
ebbc80132e
commit
d370ddd69c
17
_config.yml
17
_config.yml
@ -17,6 +17,8 @@ url: http://yoursite.com
|
|||||||
root: /
|
root: /
|
||||||
permalink: :year/:month/:day/:title/
|
permalink: :year/:month/:day/:title/
|
||||||
permalink_defaults:
|
permalink_defaults:
|
||||||
|
pretty_urls:
|
||||||
|
trailing_index: true # Set to false to remove trailing index.html from permalinks
|
||||||
|
|
||||||
# Directory
|
# Directory
|
||||||
source_dir: source
|
source_dir: source
|
||||||
@ -32,7 +34,10 @@ skip_render:
|
|||||||
new_post_name: :title.md # File name of new posts
|
new_post_name: :title.md # File name of new posts
|
||||||
default_layout: post
|
default_layout: post
|
||||||
titlecase: false # Transform title into titlecase
|
titlecase: false # Transform title into titlecase
|
||||||
external_link: true # Open external links in new tab
|
external_link:
|
||||||
|
enable: true # Open external links in new tab
|
||||||
|
field: site # Apply to the whole site
|
||||||
|
exclude:
|
||||||
filename_case: 0
|
filename_case: 0
|
||||||
render_drafts: false
|
render_drafts: false
|
||||||
post_asset_folder: false
|
post_asset_folder: false
|
||||||
@ -43,7 +48,7 @@ highlight:
|
|||||||
line_number: true
|
line_number: true
|
||||||
auto_detect: false
|
auto_detect: false
|
||||||
tab_replace:
|
tab_replace:
|
||||||
|
|
||||||
# Home page setting
|
# Home page setting
|
||||||
# path: Root path for your blogs index page. (default = '')
|
# path: Root path for your blogs index page. (default = '')
|
||||||
# per_page: Posts displayed per page. (0 = disable pagination)
|
# per_page: Posts displayed per page. (0 = disable pagination)
|
||||||
@ -52,18 +57,24 @@ index_generator:
|
|||||||
path: ''
|
path: ''
|
||||||
per_page: 10
|
per_page: 10
|
||||||
order_by: -date
|
order_by: -date
|
||||||
|
|
||||||
# Category & Tag
|
# Category & Tag
|
||||||
default_category: uncategorized
|
default_category: uncategorized
|
||||||
category_map:
|
category_map:
|
||||||
tag_map:
|
tag_map:
|
||||||
|
|
||||||
|
# Metadata elements
|
||||||
|
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
|
||||||
|
meta_generator: true
|
||||||
|
|
||||||
# Date / Time format
|
# Date / Time format
|
||||||
## Hexo uses Moment.js to parse and display date
|
## Hexo uses Moment.js to parse and display date
|
||||||
## You can customize the date format as defined in
|
## You can customize the date format as defined in
|
||||||
## http://momentjs.com/docs/#/displaying/format/
|
## http://momentjs.com/docs/#/displaying/format/
|
||||||
date_format: YYYY-MM-DD
|
date_format: YYYY-MM-DD
|
||||||
time_format: HH:mm:ss
|
time_format: HH:mm:ss
|
||||||
|
## Use post's date for updated date unless set in front-matter
|
||||||
|
use_date_for_updated: false
|
||||||
|
|
||||||
# Pagination
|
# Pagination
|
||||||
## Set per_page to 0 to disable pagination
|
## Set per_page to 0 to disable pagination
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user