Skip to content

zzjzxq33/hexo-theme-oranges

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hexo-theme-oranges

A simple hexo-theme of minimalism

Installation

在hexo博客项目根目录下执行,会将oranges主题clone至themes文件夹下

git clone https://github.com/zchengsite/hexo-theme-oranges.git themes/oranges

Usage

在hexo博客项目根目录下找到_config.yml文件,修改其中theme字段为主题名oranges

theme: oranges

configuration

Tags page (click to show)

在hexo博客项目根目录下执行,在source文件夹下生成tags文件夹

hexo new page tags

接着修改tags文件夹下index为以下内容

---
title: tags
date: 2019-05-03 12:03:35
type: "tags"
categories:
tags:
---

并在主题配置文件_config.yml修改对应enabletrue,如不想展示,设置为false即可

navbar:
  -
    name: 标签
    enable: true
    path: /tags/
Friends page (click to show)

在hexo博客项目根目录下执行,在source文件夹下生成friends文件夹

hexo new page friends

接着修改friends文件夹下index为以下内容

---
title: tags
date: 2019-05-03 12:03:35
type: "friends"
categories:
tags:
---

并在主题配置文件_config.yml修改对应enabletrue,如不想展示,设置为false即可

navbar:
  -
    name: 朋友
    enable: true
    path: /friends/
About me page (click to show)

在hexo博客项目根目录下执行,在source文件夹下生成about文件夹

hexo new page about

接着修改about文件夹下index为以下内容

---
title: tags
date: 2019-05-03 12:03:35
type: "about"
categories:
tags:
---

并在主题配置文件_config.yml修改对应enabletrue,如不想展示,设置为false即可

navbar:
  -
    name: 关于我
    enable: true
    path: /about/
Categories page (click to show)

在hexo博客项目根目录下执行,在source文件夹下生成categories文件夹

hexo new page categories

接着修改categories文件夹下index为以下内容

---
title: tags
date: 2019-05-03 12:03:35
type: "categories"
categories:
tags:
---

并在主题配置文件_config.yml修改对应enabletrue,如不想展示,设置为false即可

navbar:
  -
    name: 分类
    enable: true
    path: /categories/
Catalog(目录) (click to show)

主题配置文件_config.ymlcatalog修改enabletrue,如不想展示,设置为false即可

catalog:
  enable: true
RSS (click to show)

1.安装hexo-generator-feed官方插件

npm install hexo-generator-feed --save

2.在博客项目配置文件_config.yml(非主题配置文件)增加:

feed:
  type: atom
  path: atom.xml
  limit: 20
  hub:
  content:
  content_limit: 140
  content_limit_delim: ' '
  order_by: -date
  icon: icon.png
  autodiscovery: true
  template:

3.开启rss按钮 在主题配置文件_config.yml增加页脚项:

footer:
  social:
    -
      name: rss
      icon: rss
      path: atom.xml
Comment(评论系统) (click to show)

1.确保主题配置文件_config.ymlcomments->enable: true

2.目前支持以下几种评论插件

3.如需使用,修改相应评论下enable: true

4.查看评论插件官方教程获取相应的字段填入即可使用

valine为例,注册valine并获取appId&appKey填入即可使用

comments:
  enable: true
  valine:
    # https://valine.js.org/quickstart.html#%E8%8E%B7%E5%8F%96APP-ID-%E5%92%8C-APP-Key
    enable: true
    appId: xxxxxxxx
    appKey: xxxxxxxxx
    placeholder: welcome!
    avatar: retro
Google Analytics (click to show)

Google Analytics 注册Google分析账号,在管理/创建媒体资源/选择网站/填写相关信息后得到跟踪Id,一般格式为UA-xxxxxxx-x 如之前已有注册账号,在管理/跟踪信息/跟踪代码/找到跟踪ID,一般格式为UA-xxxxxxx-x

gtag:
  enable: true
  gtagkey: UA-xxxxxxx-x
PREV & NEXT (click to show)

文章末尾的上一篇与下一篇功能。

prevnext:
  enable: true

To Do List

主题目前功能并不多,后续根据需求考虑更新迭代。

  • 自定义导航,可灵活配置自己想要的导航✔
  • toc文章目录展示✔
    • 优化超出屏幕部分滚动显示,并自动跟随文章内容滚动[2020.5.24]
  • Fancybox,支持文章内图片友好浏览✔
  • 回到页面顶部[2020.5.4]
  • RSS Feed[2020.5.7]
  • 文章页末增加NEXT & PREV[2020.5.10]
  • 文章标题锚点[2020.5.3]
  • 评论系统[2020.5.7]
  • 分享功能
  • 文章字数统计
  • 页面访问量统计
  • Google分析[2020.5.8]
  • 文章加密
  • 文章置顶
  • 全文搜索功能
  • 主题配色切换
  • 页面平滑滚动[2020.5.4]
  • 目录激活&跟随[2020.5.4]
  • 主题样式可自定义配置

End

有问题请提交Issue,欢迎Fork。

如果觉得主题还不错,请点击Star支持下

License

MIT

Releases

No releases published

Packages

No packages published

Languages

  • HTML 59.9%
  • CSS 37.0%
  • JavaScript 3.1%