Skip to content

Commit 4795d95

Browse files
curbenghliyou54
authored andcommitted
feat: add configs introduced in Hexo v4
- pretty_urls.trailing_index: hexojs/hexo#3691 - external_link.enable: hexojs/hexo#3675 - meta_generator: hexojs/hexo#3653 - use_date_for_updated: hexojs/hexo#3235
1 parent 0f4f60c commit 4795d95

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

_config.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ url: http://yoursite.com
1717
root: /
1818
permalink: :year/:month/:day/:title/
1919
permalink_defaults:
20+
pretty_urls:
21+
trailing_index: true # Set to false to remove trailing index.html from permalinks
2022

2123
# Directory
2224
source_dir: source
@@ -32,7 +34,10 @@ skip_render:
3234
new_post_name: :title.md # File name of new posts
3335
default_layout: post
3436
titlecase: false # Transform title into titlecase
35-
external_link: true # Open external links in new tab
37+
external_link:
38+
enable: true # Open external links in new tab
39+
field: site # Apply to the whole site
40+
exclude:
3641
filename_case: 0
3742
render_drafts: false
3843
post_asset_folder: false
@@ -43,7 +48,7 @@ highlight:
4348
line_number: true
4449
auto_detect: false
4550
tab_replace:
46-
51+
4752
# Home page setting
4853
# path: Root path for your blogs index page. (default = '')
4954
# per_page: Posts displayed per page. (0 = disable pagination)
@@ -52,18 +57,24 @@ index_generator:
5257
path: ''
5358
per_page: 10
5459
order_by: -date
55-
60+
5661
# Category & Tag
5762
default_category: uncategorized
5863
category_map:
5964
tag_map:
6065

66+
# Metadata elements
67+
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
68+
meta_generator: true
69+
6170
# Date / Time format
6271
## Hexo uses Moment.js to parse and display date
6372
## You can customize the date format as defined in
6473
## http://momentjs.com/docs/#/displaying/format/
6574
date_format: YYYY-MM-DD
6675
time_format: HH:mm:ss
76+
## Use post's date for updated date unless set in front-matter
77+
use_date_for_updated: false
6778

6879
# Pagination
6980
## Set per_page to 0 to disable pagination

0 commit comments

Comments
 (0)