# Site title:gyro永不抽风 subtitle:ああああああああああああああああおおおおおおおおおおおおおおおお description:更新?咕咕咕... keywords:蒟蒻 author:HaoyunQin language:zh-CN timezone:Asia/Shanghai
# URL ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' url:你自己的域名 root:/ permalink::year/:month/:day/:title/ permalink_defaults: pretty_urls: trailing_index:true# Set to false to remove trailing 'index.html' from permalinks trailing_html:true# Set to false to remove trailing '.html' from permalinks
# Writing new_post_name::year:month/:title.md# File name of new posts default_layout:post titlecase:false# Transform title into titlecase external_link: enable:true# Open external links in new tab field:site# Apply to the whole site exclude:'' filename_case:0 render_drafts:false post_asset_folder:true relative_link:false future:true highlight: enable:true line_number:true auto_detect:false tab_replace:'' wrap:true hljs:false
# 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:
# Metadata elements ## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta meta_generator:true
# 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 ## Use post's date for updated date unless set in front-matter use_date_for_updated:false
# Pagination ## Set per_page to 0 to disable pagination per_page:10 pagination_dir:page
# Include / Exclude file(s) ## include:/exclude: options only apply to the 'source/' folder include: exclude: ignore:
# 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 # If you want to animate the icon, set it to true. animated:true # Change the color of icon, using Hex Code. color:"#FF3348"
在文章最后与侧边栏附上版权声明
1 2 3 4 5 6 7 8 9 10
# 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:zh-cn
{%- if theme.related_posts.enable and (theme.related_posts.display_in_home or not is_index) %} {{ partial('_partials/post/post-related.swig') }} {%- endif %}
后添加:
1 2 3 4
{% if not is_index %} {% include 'my-copyright.swig' %} {% endif %}
# Usage: `Key: /link/ || icon` # Key is the name of menu item. If the translation for this item is available, the translated text will be loaded, otherwise the Key name will be used. Key is case-senstive. # Value before `||` delimiter is the target link, value after `||` delimiter is the name of Font Awesome icon. # When running the site in a subdirectory (e.g. yoursite.com/blog), remove the leading slash from link value (/archives -> archives). # External url should start with http:// or https:// menu: home:/||home #about: /about/ || user tags:/tags/||tags categories:/categories/||th archives:/archives/||archive #schedule: /schedule/ || calendar #sitemap: /sitemap.xml || sitemap #commonweal: /404/ || heartbeat
并且需要新建文件,命令:
1
hexo new page tags
1
hexo new page categories
接下来分别打开这两个文件,分别在最上面两个分割线处添加:
1
type: "tags"
1
type: "categories"
为侧边栏添加自定义的栏目
和前面新建tags和categories的方法差不多,假设你想添加的栏目为done,运行如下命令:
1
hexo new page done
然后到_config.yml中添加为:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# Usage: `Key: /link/ || icon` # Key is the name of menu item. If the translation for this item is available, the translated text will be loaded, otherwise the Key name will be used. Key is case-senstive. # Value before `||` delimiter is the target link, value after `||` delimiter is the name of Font Awesome icon. # When running the site in a subdirectory (e.g. yoursite.com/blog), remove the leading slash from link value (/archives -> archives). # External url should start with http:// or https:// menu: home:/||home #about: /about/ || user tags:/tags/||tags categories:/categories/||th archives:/archives/||archive #schedule: /schedule/ || calendar #sitemap: /sitemap.xml || sitemap #commonweal: /404/ || heartbeat done:/done/||calendar
sidebar: # Sidebar Position. #position: left position:right
侧边栏头像设置
1 2 3 4 5 6 7 8
# Sidebar Avatar avatar: # Replace the default image and set the url here. url:/images/avatar.JPG # If true, the avatar will be dispalyed in circle. rounded:true # If true, the avatar will be rotated with the cursor. rotated:true
其中avatar.JPG是图片名,图片文件放置在source/images下
侧边栏添加社交网络账号
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# Social Links # Usage: `Key: permalink || icon` # Key is the link label showing to end users. # Value before `||` delimiter is the target permalink, value after `||` delimiter is the name of Font Awesome icon. social: GitHub:https://github.com/JeffersonQin||github E-Mail:mailto:[email protected]||envelope Weibo:https://weibo.com/5981714994||weibo 洛谷:https://www.luogu.com.cn/user/200035|| bilibili:https://space.bilibili.com/114418778||youtube-play 网易云音乐:https://music.163.com/#/user/home?nickname=gyro%E6%B0%B8%E4%B8%8D%E6%8A%BD%E9%A3%8E||music QQ:tencent://AddContact/?fromId=50&fromSubId=1&subcmd=all&uin=1247006353||qq #Google: https://plus.google.com/yourname || google #Twitter: https://twitter.com/yourname || twitter #FB Page: https://www.facebook.com/yourname || facebook #StackOverflow: https://stackoverflow.com/yourname || stack-overflow #YouTube: https://youtube.com/yourname || youtube #Instagram: https://instagram.com/yourname || instagram #Skype: skype:yourname?call|chat || skype
这当中的链接改成自己的链接,最后QQ中的1247006353改为自己的qq号即可。
添加友链
首先先加入:
1 2 3 4 5 6
# Blog rolls links_settings: icon:coffee title:奶茶铺的邻居(们) # Available values: block | inline layout:block
# Table of Contents in the Sidebar # Front-matter variable (unsupport wrap expand_all). 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:true # Maximum heading depth of generated toc. max_depth:6
首页文章简短显示
1 2 3 4 5 6
# Automatically excerpt description in homepage as preamble text. excerpt_description:true
# Read more button # If true, the read more button will be displayed in excerpt section. read_more_btn:true
# Use icon instead of the symbol # to indicate the tag at the bottom of the post tag_icon:true
打赏功能
1 2 3 4 5 6 7 8 9 10 11 12 13
# Reward (Donate) # Front-matter variable (unsupport animation). reward_settings: # If true, reward will be displayed in every article by default. enable:true animation:false comment:真的不买杯奶茶吗?T^T
# Related popular posts # Dependencies: https://github.com/tea3/hexo-related-popular-posts related_posts: enable:true title:# Custom header, leave empty to use the default one display_in_home:false params: maxCount:5 #PPMixingRate: 0.0 #isDate: false #isImage: false #isExcerpt: false
代码块风格设置
1 2 3 4 5 6 7 8 9 10 11 12
codeblock: # Code Highlight theme # Available values: normal | night | night eighties | night blue | night bright | solarized | solarized dark | galactic # See: https://github.com/chriskempson/tomorrow-theme highlight_theme:nighteighties # Add copy button on codeblock copy_button: enable:true # Show text copy result. show_result:true # Available values: default | flat | mac style:mac
返回顶部按钮
1 2 3 4 5 6
back2top: enable:true # Back to top in sidebar. sidebar:true # Scroll percent label in b2t button. scrollpercent:true
阅读进度条
1 2 3 4 5 6 7
# Reading progress bar reading_progress: enable:true # Available values: top | bottom position:top color:"#E8704E" height:3px
书签
1 2 3 4 5 6 7 8
# Bookmark Support bookmark: enable:true # Customize the color of the bookmark. color:"#E8704E" # If auto, save the reading progress when closing the page or clicking the bookmark-icon. # If manual, only save it by clicking the bookmark-icon. save:manual
右上角Github图标
1 2 3 4 5
# `Follow me on GitHub` banner in the top-right corner. github_banner: enable:true permalink:https://github.com/JeffersonQin title:FollowmeonGitHub
Mathjax数学公式
安装:
1 2
$ npm un hexo-renderer-marked $ npm i hexo-renderer-kramed # or hexo-renderer-pandoc
valine: enable:true appid:yourappid# Your leancloud application appid appkey:yourappkey# Your leancloud application appkey notify:false# Mail notifier verify:false# Verification code placeholder:ヾノ≧∀≦)o来呀!快活呀!~# Comment box placeholder avatar:mm# Gravatar style guest_info:nick,mail,link# Custom comment header pageSize:10# Pagination size language:zh-cn# Language, available values: en, zh-cn visitor:true# Article reading statistic comment_count:true# If false, comment count will only be displayed in post page, not in home page recordIP:true# Whether to record the commenter IP serverURLs:# When the custom domain name is enabled, fill it in here (it will be detected automatically by default, no need to fill in) #post_meta_order: 0
# PDF tag # NexT will try to load pdf files natively, if failed, pdf.js will be used. # So, you have to install the dependency of pdf.js if you want to use pdf tag and make it available to all browsers. # See: https://github.com/theme-next/theme-next-pdf pdf: enable:true # Default height height:500px
Usage
1
{% pdf /path/to/your/file.pdf %}
Update
1 2
$ cd themes/next/source/lib/pdf $ git pull
搜索功能
1
$ npm install hexo-generator-searchdb
1 2 3 4 5 6 7 8 9 10 11 12 13
# Local Search # Dependencies: https://github.com/theme-next/hexo-generator-searchdb local_search: enable:true # If auto, trigger search by changing input. # If manual, trigger search by pressing enter key or search button. trigger:auto # Show top n results per article, show all results by setting to -1 top_n_per_article:1 # Unescape html strings to the readable one. unescape:false # Preload the search data when the page loads. preload:false
# Note tag (bs-callout) note: # Note tag style values: # - simple bs-callout old alert style. Default. # - modern bs-callout new (v2-v3) alert style. # - flat flat callout style with background, like on Mozilla or StackOverflow. # - disabled disable all CSS styles import of note tag. style:simple icons:true # Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6). # Offset also applied to label tag variables. This option can work with disabled note tag. light_bg_offset:0