Giter Site home page Giter Site logo

zhuwenwen0 / hexo-theme-concise Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sanonz/hexo-theme-concise

0.0 0.0 0.0 349 KB

Hexo 简约主题,响应式设计支持 PC、手机等设备,代码高亮使用 monokai-sublime 风格。

Home Page: https://sanonz.github.io/

License: MIT License

HTML 17.36% CSS 81.86% JavaScript 0.78%

hexo-theme-concise's Introduction

Concise

Hexo 简约主题,响应式设计支持 PC、手机等设备,代码高亮使用 monokai-sublime 风格,在线预览

Preview

前提

因为这个主题使用了 less 编译,Hexo 默认的编译器为 hexo-renderer-stylus 要切换为 hexo-renderer-less

$ npm install hexo-renderer-less --save

如果你不需要 hexo-renderer-stylus 可以把它卸载掉

$ npm uninstall hexo-renderer-stylus --save

安装

$ git clone https://github.com/sanonz/hexo-theme-concise.git themes/concise

Concise 主题需要 Hexo 2.4 或者更高的版本

切换

  1. _config.yml 配置文件中 把 theme 值改为 concise.
  2. 复制 themes/concise/_config.example.yml 配置文件为 themes/concise/_config.yml

更新

$ cd themes/concise
$ git pull

配置

修改 themes/concise/_config.yml 配置文件

# Header
menu:
  首页: /
  前端: /categories/front-end
  后端: /categories/back-end
  标签: /tags
  归档: /archives
  订阅: /atom.xml
  关于: /about

# Content
excerpt_link: 阅读更多

# Sidebar
author:
  name: Sanonz
  work: Web Developer & Designer
  location: Shenzhen, China
  avatar_url: /images/avatar.jpg

# Links:
links:
  - svg: ./source/svg/github.svg
    url: https://github.com/sanonz
  - svg: ./source/svg/more.svg
    url: http://weibo.com/sanonz
  - svg: ./source/svg/twitter.svg
    url: https://twitter.com/sanonze

# github comment 
git_commit:
  enable: true
  client_id: 7fbe80427f54741e289f
  client_secret: f34ed5fd92e54c9000bd37ba951948cb939deff5
  repo: sanonz.github.io
  owner: sanonz
  admin:
  - sanonz
  per_page: 10

# Baidu
baidu:
  id: e4027971a230b210f4671f485b33846a

# Miscellaneous
rss: /atom.xml
favicon: /images/favicon.ico
  • menu - 导航列表
  • excerpt_link - 文章列表阅读更多显示文字
  • sidebar - 配置博主个人信息,显示在边栏
  • links - 配置博主个人信息下边的链接,icon 存放位置为:./source/svg
  • git_commit - 配置评论,使用的 gitalk 插件,具体配置说明请到官方查看 https://github.com/gitalk/gitalk
  • baidu - 配置站点访问统计,需要自行注册 百度统计 然后获取 ID 填写到这里
  • rss - 在 <head> 标签中显示 RSS 链接
  • favicon - favicon URL 地址配置

小技巧

想要自定义 icon 的话,可以到 fontawesomeiconfont 下载 svg 格式图标,放到 ./source/svg 目录,按着如下例子配置

links:
  - svg: ./source/svg/your.svg
    url: https://your.com

可以关闭单个文章的评论,把 comments 设置为 false,默认为 true,例如:

---
title: Hello World
date: 2017-10-20 20:00:00
comments: true
---

访问 Tags 页面 404,执行一下命令解决

$ hexo new tags "标签"

添加分类列表,设置文章的 categories 字段然后访问 /categories/front-end

---
title: Hello World
date: 2017-10-20 20:00:00
categories: front-end
---

单独设置归档(Archive)每页显示文章数量,例如每页 30

# Archive page setting
archive_generator:
  per_page: 30
  order_by: -date

列表文章显示 阅读更多 按钮,在需要截断的地方插入 <!-- more --> 注释

hexo-theme-concise's People

Contributors

r-luo avatar sanonz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.