# URL ## If your site is put in a subdirectory, set url as'http://yoursite.com/child' and root as'/child/' url: #站点url enforce_ssl: #强制使用ssl root: #站点目录 permalink: archives/:abbrlink.html #站点链接设置 abbrlink: #abbrlink设置 alg: crc32 # 算法:crc16(default) and crc32 rep: hex # 进制:dec(default) and hex ## crc16 & hex ## https://iassas.com/posts/66c8.html ## crc16 & dec ## https://iassas.com/posts/65535.html ## crc32 & hex ## https://iassas.com/posts/8ddf18fb.html ## crc32 & dec ## https://iassas.com/posts/1690090958.html permalink_defaults:
# 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:5 order_by:-date
# Category & Tag default_category: uncategorized #默认分类 category_map:#分类别名 tag_map:#标签别名
Date配置
用于配置日期的主要属性。该部分的配置不需要修改。
1 2 3 4 5 6
# 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配置
用于配置分页的主要属性。
1 2 3 4
# Pagination ## Set per_page to 0 to disable pagination per_page:10#每页显示的文章量 (0 = 关闭分页功能) pagination_dir: page #分页目录
footer: # Specify the date when the site was setup. # If not defined, current year will be used. since:#网站建立日期
# Icon between year and copyright info. icon:heart#年份和版权之间的图标
# If not defined, will be used `author` from Hexo main config. copyright:Hywell#版权 # ------------------------------------------------------------- # Hexo link (Powered by Hexo). powered:false
theme: # Theme & scheme info link (Theme - NexT.scheme). enable:false # Version info of NexT after scheme info (vX.X.X). version:false # ------------------------------------------------------------- # Any custom text can be defined here. custom_text:#输入自定义文本
scroll_to_more:true#如果文章有摘要(<!-- more -->),会自动滚动到摘要下面。 save_scroll:true#通过cookies来缓存阅读进度 excerpt_description:true#自动摘录描述作为序言 auto_excerpt:#自动摘录,如果不设置<!-- more -->的话,可以用这个来控制 enable:true length:150
local_search: enable: true # if auto, triggersearchby changing input # if manual, triggersearchby pressing enter key orsearch button trigger: auto # show top n results per article, showall results by setting to-1 top_n_per_article: 1
用于页面评论系统设置,本来选用Hypercomments,在样式上设置不好看。因此,换成了Gitment。需要扩展Gitmentnpm i --save gitment。
1 2 3 4 5 6 7 8 9 10 11 12 13
gitment: enable:true mint:true# RECOMMEND, A mint on Gitment, to support count, language and proxy_gateway count:true# Show comments count in post meta area lazy:true# Comments lazy loading with a button cleanly:false# Hide 'Powered by ...' on footer, and more language:# Force language, or auto switch by theme github_user:user# MUST HAVE, Your Github Username github_repo:user.github.io# MUST HAVE, The name of the repo you use to store Gitment comments client_id:# MUST HAVE, Github client id for the Gitment client_secret:# EITHER this or proxy_gateway, Github access secret token for the Gitment proxy_gateway:# Address of api proxy, See: https://github.com/aimingoo/intersect redirect_protocol:# Protocol of redirect_uri with force_redirect_protocol when mint enabled