avatar: # In theme directory (source/images): /images/avatar.gif # In site directory (source/uploads): /uploads/avatar.gif # You can also use other linking images. url: /images/avatar.jpg #头像文件目录 # If true, the avatar would be dispalyed in circle. rounded: true #设置鼠标放在头像上面是否旋转 # If true, the avatar would be rotated with the cursor. rotated: true #头像是否设为圆形
toc: enable: true #自动生成目录 # Automatically add list number to toc. number: true #自动产生目录编号 # If true, all words will placed on next lines if header width longer then sidebar width. wrap: false #标题过长是否换行 # If true, all level of TOC in a post will be displayed, rather than the activated part of it. expand_all: false # 是否显示所有等级的目录项。 # Maximum heading depth of generated toc. You can set it in one post through `toc_max_depth` in Front-matter. max_depth: 6 #最大标题嵌套个数
sidebar: # Sidebar Position.#侧边栏的位置 position: left #position: right
# Manual define the sidebar width. If commented, will be default for: # Muse | Mist: 320 # Pisces | Gemini: 240 #width: 300
# Sidebar Display (only for Muse | Mist), available values: # - post expand on posts automatically. Default. # - always expand for all pages automatically. # - hide expand only when click on the sidebar toggle icon. # - remove totally remove sidebar including sidebar toggle. display: post
# Sidebar offset from top menubar in pixels (only for Pisces | Gemini). offset: 12 # 侧边栏相对主菜单的像素距离 # Enable sidebar on narrow view (only for Muse | Mist). onmobile: false #在手机上侧边栏是否显示
# 返回顶部 back2top: enable: true # Back to top in sidebar. sidebar: false #侧边栏显示返回顶部信息,默认显示在页面右下方 # Scroll percent label in b2t button. scrollpercent: #显示百分比
# 设置动态背景 # Canvas-nest # Dependencies: https://github.com/theme-next/theme-next-canvas-nest canvas_nest: enable: true onmobile: true # display on mobile or not color: "0,0,255" # RGB values, use `,` to separate opacity: 0.5 # the opacity of line: 0~1 zIndex: -1 # z-index property of the background count: 170 # the number of lines
# JavaScript 3D library. # Dependencies: https://github.com/theme-next/theme-next-three three: enable: false delay: false # Set true to further delay loading three_waves: true canvas_lines: false canvas_sphere: false
# Canvas-ribbon # Dependencies: https://github.com/theme-next/theme-next-canvas-ribbon canvas_ribbon: enable: false size: 300 # The width of the ribbon alpha: 0.6 # The transparency of the ribbon zIndex: -1 # The display level of the ribbon
# 博客底部布局 footer: # Specify the date when the site was setup. If not defined, current year will be used. #since: 2015 #设置建站时间,不设置则默认为当前年份
# Icon between year and copyright info. icon: # Icon name in Font Awesome. See: https://fontawesome.com/v4.7.0/icons/ # `heart` is recommended with animation in red (#ff0000). name: heart # 作者图标,默认为author,自定义的图标需来自fontawesome中 # If you want to animate the icon, set it to true. animated: true # 图标是否闪动 # Change the color of icon, using Hex Code. color: "#808080" # 图标颜色
# If not defined, `author` from Hexo `_config.yml` will be used. copyright: 小白 #设置底部显示的名字,默认为站点配置文件的author名字
powered: # Hexo link (Powered by Hexo). enable: false # 是否显示 Powered By Hexo # Version info of Hexo after Hexo link (vX.X.X). version: false # 是否显示 Hexo 版本
theme: # Theme & scheme info link (Theme - NexT.scheme). enable: false # 是否显示主题信息 # Version info of NexT after scheme info (vX.X.X). version: false # 是否显示主题版本
# Beian ICP information for Chinese users. See: http://www.beian.miit.gov.cn beian: enable: false # 是否显示网站备案信息 icp:
# `Follow me on GitHub` banner in the top-right corner. # Github 跳转图标 github_banner: enable: true # 功能开关 permalink: https://github.com/yourname # Github主页地址 title: Follow me on GitHub # 鼠标悬停显示的文字
# Read more button # If true, the read more button would be displayed in excerpt section. read_more_btn: true # 是否显示阅读全文按钮
但是这样的方式不够自由,我们可以使用如下方式:
使用 <!--more--> 标签分隔,格式如下:
这样,<!--more--> 标签上的内容为概述,下面为正文,效果如下:
6.2 代码块设置
使用参照如下:
# 代码块设置 codeblock: # Code Highlight theme # Available values: normal | night | night eighties | night blue | night bright # See: https://github.com/chriskempson/tomorrow-theme # 代码块主题, 可选的值为 normal; night; night eighties; night blue; night bright highlight_theme: night # Add copy_button on codeblock # 显示复制按钮 copy_button: enable: true # Show text copy result. show_result: true # Available values: default | flat | mac style: # 按钮显示格式
#Reward (Donate) #打赏设置 reward_settings: #If true, reward would be displayed in every article by default. #You can show or hide reward in a specific article throuth `reward: true | false` in Front-matter. enable: true # 功能开关 animation: true # 动画 #comment: Donate comment here.
#Creative Commons 4.0 International License. #See: https://creativecommons.org/share-your-work/licensing-types-examples #Available values of license: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | zero #You can set a language value if you prefer a translated version of CC license, e.g. deed.zh #CC licenses are available in 39 languages, you can find the specific and correct abbreviation you need on https://creativecommons.org creative_commons: license: by-nc-sa #许可协议 sidebar: true #侧边栏显示 post: true #文章底部显示 language:
{#####################} {### END POST BODY ###} {#####################} <!--文章结束标语--> {%4if theme.post_end_text && not is_index%} {% include 'post-end-text.swig' %} {% endif %}