widgets: # Profile widget configurations - # Where should the widget be placed, left sidebar or right sidebar position: left type: profile # Author name author: xxx # Author title author_title: CowHorse # Author's current location location: xxx # URL or path to the avatar image avatar: https://cdn.jsdelivr.net/gh/alohe/avatars/png/notion_14.png # Whether show the rounded avatar image avatar_rounded: false # Email address for the Gravatar gravatar: # URL or path for the follow button follow_link: https://github.com/sadqdsadsadqwd # Links to be shown on the bottom of the profile widget social_links: Github: icon: fab fa-github url: https://github.com/sadsdqdsdqdsqdsd RSS: icon: fas fa-rss url: /
添加about页面
1
hexo new page "about"
会在根目录的source文件夹下新建about/index.md
删掉不需要的配置,这三个下面的全部删掉
1 2 3 4
# Donate plugin configurations # Share plugin configurations # Comment plugin configurations # Google AdSense unit configurations
配置只显示部分内容,不显示全文,在文章截断的地方加上
1
<!--more-->
widgets:配置下面的都是针对单篇文章的配置,显示目录的话,文章头部加上
1
toc: true
设置左侧栏固定
1 2 3 4 5 6 7 8 9
sidebar: # Left sidebar configurations left: # Whether the sidebar sticks to the top when page scrolls sticky: true # Right sidebar configurations right: # Whether the sidebar sticks to the top when page scrolls sticky: false
设置目录显示在哪
1 2 3 4 5 6 7 8 9 10 11
# Table of contents widget configurations - # Where should the widget be placed, left sidebar or right sidebar position: left type: toc # Whether to show the index of each heading index: true # Whether to collapse sub-headings when they are out-of-view collapsed: true # Maximum level of headings to show (1-6) depth: 3
加密配置
1
npm install hexo-blog-encrypt
__config.yml加上
1 2 3 4
# Security ## encrypt: enable: true
文章头部加上
1 2 3
password: 123 abstract: This blog is encrypted. message: You must enter the password to read.