linux服务器下搭建hexo个人博客03:NexT主题基础配置

安装NexT主题

在hexo目录在使用git命令安装NexT主题,目前NexT主题的版本为V7.7.2,因此可能有些配置与之前版本会存在一点差异

使用git来安装NexT,指令clone目录为themes/next,便于hexo框架以后更换主题

git clone https://github.com/theme-next/hexo-theme-next themes/next
NexT主题设定

首先我们认识一下配置文件_config.yml

hexo目录下的_config.yml:主题配置文件

themes/next目录下的_config.yml:站点配置文件

后面,我们主题的美化,将会经常修改这两个配置文件

更换当前hexo主题,设置站点名、语言、作者及其相关描述

打开站点配置文件

vim _config.yml

vim可在命令模式下:/Site来找到关键字Site,修改相关内容

# Site
title: xcatf's Blog
subtitle:
description: 千般荒凉,以此为梦。<br>万里蹀躞,以此为归。
keywords:
author: xcatf # 作者名字
language: zh-CN # NexT V7简体中文为zh-CN
timezone: '' # timezone为时区,默认设置即可

:/theme寻找关键字theme,修改hexo主题

# Extensions
## Plugins: https://hexo.io/plugins/
plugins: hexo-generate-feed
## Themes: https://hexo.io/themes/
theme: next
更换风格scheme

NexT主题有四种不同风格

在主题配置文件theme/next/_config.yml下查找Schemes

# Schemes
#scheme: Muse
#scheme: Mist
scheme: Pisces
#scheme: Gemini
  • Muse - 默认 Scheme,这是 NexT 最初的版本,黑白主调,大量留白
  • Mist - Muse 的紧凑版本,整洁有序的单栏外观
  • Pisces - 双栏 Scheme,小家碧玉似的清新

Scheme 的切换通过更改 主题配置文件,搜索 scheme 关键字。 你会看到有三行 scheme 的配置,将你需用启用的 scheme 前面注释 # 去除即可。

设置菜单

编辑主题配置文件,寻找关键字menu,根据需要去除#即可

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
设置头像

编辑主题配置文件,寻找关键字avatar,头像的路径在themes/next/source/images

# Sidebar Avatar 头像
avatar:
  # Replace the default image and set the url here.
  url: /images/avatar.png #图片路径
  # If true, the avatar will be dispalyed in circle.
  rounded: true   # 头像会根据你的图片展示成圆形或椭圆
  # If true, the avatar will be rotated with the cursor.
  rotated: true
  # 透明度
  opacity: 1

暂时写到这吧,查阅官方文档可以获得更加详细的帮助

http://theme-next.iissnan.com/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值