这两天整理网站方面的事,本地IIS部署个人网站,发现我的hexo做的个人网站实在很单调,于是找来资料做进一步的配置。

一、网站图标

看一下hexo\themes\modernist\layout\_partial\head.ejs,找到这句:

<link rel="icon" type="image/x-icon" href="<%- config.root %>favicon.ico">

我的是<link rel="icon" type="image/x-icon" href="<%- theme.favicon %>"> 不修改,好像也可以。。只是把favicon.ico放到hexo\source目录下了。

你懂的,将你的favicon.ico放到工程根目录下即可,也就是hexo\source目录。可以在线制作你的ico图标

二、主题的更换

萝卜白菜各有所爱,玩博客换主题是必不可少的,hexo的默认主题为landscape,hexo的主题列表 Hexo Themes
我比较喜欢 pacmanmodernistishgoraytaylorism。Pacman最为优秀,简洁大方小清新,同时移动版本支持的也很好,但作者并没有把很多参数分离出来给出可配置项,我最终选择了modernist。

安装modernist主题的方法就是一句git命令:

git clone https://github.com/heroicyang/hexo-theme-modernist.git themes/modernist

(参考了主题列表的文章里   Install:

Execute the following command, and modify theme in _config.yml to theme-name

$ git clone<repository> themes/<theme-name>

安装完成后,打开hexo\_config.yml,修改主题为modernist

1
theme: modernist

打开hexo\themes\modernist目录,编辑主题配置文件_config.yml:

menu: #配置页头显示哪些菜单(下面几个自己定义页面,往下文看)
#  Home: /
  Archives: /archives
  Reading: /reading
  About: /about
#  Guestbook: /about

excerpt_link: Read More #摘要链接文字
archive_yearly: false #按年存档

widgets: #配置页脚显示哪些小挂件
  - category
#  - tag
  - tagcloud
  - recent_posts
#  - blogroll

blogrolls: #友情链接
  - bruce sha's duapp wordpress: http://ibruce.duapp.com
  - bruce sha's javaeye: http://buru.iteye.com
  - bruce sha's oschina blog: http://my.oschina.net/buru
  - bruce sha's baidu space: http://hi.baidu.com/iburu

fancybox: true #是否开启fancybox效果

duoshuo_shortname: buru #多说账号

google_analytics:
rss:
View Code

相关文章:

  • 2021-11-15
  • 2022-12-23
  • 2021-04-09
  • 2022-01-28
  • 2021-11-29
  • 2021-11-05
  • 2021-04-02
  • 2021-11-20
猜你喜欢
  • 2022-12-23
  • 2021-12-05
  • 2021-06-15
  • 2021-06-03
  • 2022-12-23
  • 2021-10-03
  • 2021-07-05
相关资源
相似解决方案