网站的配置文件
1. 主要是修改/_config.yml
文件里面的东西
2. 配置文件中,冒号后面一定要加空格 Hexo Configuration
# Docs: https://hexo.io/docs/configuration.html
# Source: https://github.com/hexojs/hexo/
Site
标题
title: 一个被怼的小开发
副标题
subtitle: 我就看你皮
网站描述
description: 我就看你皮
作者昵称
author: 一个被怼的小开发
网站语言,默认英语,设置简体汉语
language: zh-Hans
时区,默认电脑时区
timezone:
网址设置
如果网站是放在子目录中,将url设置成'http://yoursite.com/child',将root设置成'/child/'
网址
url: http://yoursite.com
网站根目录。如果网站是放在子目录中,将root设置成'子目录名'
root: /
文章链接地址格式 。即文章存放的目录。
permalink_defaults:
Directory
资源文件夹,放在里面的文件会上传到github中
source_dir: source
公共文件夹,存放生成的静态文件
public_dir: public
标签文件夹,默认是tags。实际存放在source/tags中。
tag_dir: tags
档案文件夹,默认是archives。
archive_dir: archives
分类文件夹,默认是categories。实际存放在source/categories中。
category_dir: categories
代码文件夹,默认是downloads/code
code_dir: downloads/code
国际化文件夹,默认跟language相同
i18n_dir: :lang
不需要渲染的文件夹或文件夹,放在[]中
这里我实在source下面建立ori_data文件夹,存放原始.md文件,上传git管理
skip_render: [README.md, ori_data/*, ori_data/posts/*, ori_data/tags/*, ori_data/categories/*, ori_data/themes/next/*] # 禁止进行渲染的文件
Writing
新建博文(帖子)的默认名称
new_post_name: :title.md # File name of new posts
默认布局模板是post,而不是draft和page
default_layout: post
是否将标题转换成标题形式(首字母大写)
titlecase: false # Transform title into titlecase
在新标签页面中打开网页
external_link: true # Open external links in new tab
filename_case: 0
是否渲染草稿
render_drafts: false
启动 Asset 文件夹
post_asset_folder: false
把链接改为与根目录的相对位址
relative_link: false
显示未来的文章
future: true
代码块的设置
highlight:
enable: true # 使用代码高亮
line_number: false # 显示行号
auto_detect: true # 自动检测语言
tab_replace:
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/
日期和时间格式
Hexo 使用 Moment.js 来解析和显示时间。
date_format: YYYY-MM-DD
time_format: HH:mm:ss
Pagination
# Set per_page to 0 to disable pagination
per_page: 10
分页路径,在public中可以看到
pagination_dir: page
Extensions
Extensions 拓展插件配置
# Plugins: https://hexo.io/plugins/
# Themes: https://hexo.io/themes/
主题配置
theme: next
Deployment
部署配置
# Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
repo:
github: git@github.com:Smalldevelopment/Smalldevelopment.github.io.git,master
# coding: git@git.coding.net:ookamiantd/ookamiantd.git,master