Hexo 站点配置文件内容解释

版权声明:原创不易,未经作者允许请勿随意转载!因个人能力和精力有限,难免有疏漏和不足之处,欢迎指正,谢谢~ https://blog.csdn.net/lijing742180/article/details/85722664

文章目录


以下是 Hexo 中的站点配置文件内容,我直接在代码中来解释,注意看下面代码中的注释信息:

# Hexo Configuration
<!-- 下面是关于该配置文件的官方帮助文档 -->
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

<!-- 下面是关于网站的信息,分别是:
页面标题;
副标题;
描述信息;
用于 seo 的关键字;
作者名字;
网站语言,默认是英语,最好修改成中文 zh-Hans;
网站时区,默认使用你电脑的设置,最好修改成 Asia/Shanghai -->
# Site
title: ivyli's blog
subtitle: Welcome !
description: 爱折腾的测试媛一枚。
keywords:
author: ivyLi
language: zh-Hans
timezone: Asia/Shanghai

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://yoursite.com
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:

<!--
网站文件夹的默认设置:
source--存放博客文章
public--静态网站生成的地方
tags--标签文件夹
archives--归档文件夹
categories--分类文件夹
source 的子文件夹,默认是 downloads/code
:lang--i18n 国际化文件夹
-->
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

<!--写作部分:
新文章的名称:默认是:title.md
默认的layout:post
titlecase:是否把标题转换成titlecase,默认是否
是否在新窗口打开内部链接:默认是true
filenamecase:文件名称的转换格式,默认是 0 表示不转换,1 表示转换成小写,2 表示转换成大写
render_drafts:是否显示草稿
post_asset_folder:是否允许 Asset 文件夹,用于存放文章图片等资源
relative_link:是否使用相对链接(相对根文件夹),默认不使用
future:是否展示 future 博文,默认是
高亮:代码块高亮设置,需要都修改成 true
-->
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
  enable: true
  line_number: true
  auto_detect: true
  tab_replace: true

<!--主页设置,路径、每页展示文章数量、文章排序-->  
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
  path: ''
  per_page: 10
  order_by: -date

<!--分类和标签-->  
# Category & Tag
default_category: uncategorized
category_map:
tag_map:

<!--日期和时间格式--> 
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss

<!--页码-->
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page

<!--主题设置-->
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
#theme: landscape
theme: next

<!--部署设置-->
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
  type: git
  repo: [email protected]:ivyli2019/ivyli2019.github.io.git
  branch: master

猜你喜欢

转载自blog.csdn.net/lijing742180/article/details/85722664