# Custom Logo (Do not support scheme Mist) custom_logo: /images/themeImg/logo.png
代码高亮显示和复制按钮
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: night # Add copy button on codeblock copy_button: enable: true # Show text copy result. show_result: true # Available values: default | flat | mac style:
bookmark: enable: false # Customize the color of the bookmark. color: "#222" # 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: auto
Follow me 标签
1 2 3 4 5
# Follow me on GitHub banner in right-top corner. github_banner: enable: true permalink: https://github.com/yourname title: Follow me on GitHub
font: # Use custom fonts families or not. # Depended options: `external` and `family`. enable: true
# Uri of fonts host, e.g. //fonts.googleapis.com (Default). host:
# Font options: # `external: true` will load this font family from `host` above. # `family: Times New Roman`. Without any quotes. # `size: x.x`. Use `em` as unit. Default: 1 (16px)
# Global font settings used for all elements inside <body>. global: external: true family: Monda size: 1.125
# Font settings for site title (.site-title). title: external: true family: Lobster Two size:
# Font settings for headlines (<h1> to <h6>). headings: external: true family: Amita size:
# Font settings for posts (.post-body). posts: external: true family: Roboto Slab
# Font settings for <code> and code blocks. codes: external: true family: PT Mono
安装插件
支持两种安装方法
本地安装
使用CDN links
如果你的站点是部署在一些免费的云端,推荐使用CDN links,因为它加载起来更快
本地安装
1 2 3 4 5 6 7
#在bash中安装下载对应插件 $ cd themes/next $ git clone https://github.com/theme-next/theme-next-pjax source/lib/pjax # 启用pjax插件 # Easily enable fast Ajax navigation on your website. # Dependencies: https://github.com/theme-next/theme-next-pjax pjax: true
CDN links 安装
jsDelivr CDN is recommended to deliver our third-party plugins
1 2 3 4 5 6 7
# Script Vendors. Set a CDN address for the vendor you want to customize. # Be aware that you would better use the same version as internal ones to avoid potential problems. # Remember to use the https protocol of CDN files when you enable https on your site. vendors: # Internal path prefix. _internal: lib pjax: https://cdn.jsdelivr.net/npm/pjax@0.2.8/pjax.min.js
valine: enable: true appid: # Your leancloud application appid appkey: # Your leancloud application appkey notify: false# Mail notifier verify: false# Verification code placeholder: Just go go # 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: false# Article reading statistic comment_count: true# If false, comment count will only be displayed in post page, not in home page recordIP: false# 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
5.搜索
使用本地插件配置搜索数据库
1
npm install hexo-generator-searchdb
hexo/_config.yml文件配置
1
`search: path: search.xml field: post format: html limit: 10000`
next/_config.yml文件中配置
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
$ git clone -b source git@e.coding.net:biocodehub/codeHub.git $ hexo s $ npm install hexo-deployer-git -save # 推送到远端 $ hexo g && gulp hexo d
10文章访问统计
使用LeanCloud (China)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
npm install hexo-leancloud-counter-security #hexo 站点进行配置 leancloud_counter_security: enable_sync: true app_id: <your app id> app_key: <your app key> username: <your username> # Will be asked while deploying if is left blank password: <your password> # Recommmended to be left blank. Will be asked while deploying if is left blank # 主题配置文件 leancloud_visitors: enable: true app_id: #<app_id> app_key: #<app_key> # Required for apps from CN region server_url: # <your server url> # Dependencies: https://github.com/theme-next/hexo-leancloud-counter-security # If you don't care about security in lc counter and just want to use it directly # (without hexo-leancloud-counter-security plugin), set the `security` to `false`. security: true