Skip to content

User guide

littlewin edited this page Mar 28, 2017 · 6 revisions

Hexo theme - casual support config and self definition


Config

Add_about_page

  • In blog root dir
$ hexo new page about
  • Modify source/about/index.md
---
title: About me
layout: "about"
---
//Add personal info you'd like to add

Modify_favicon

Add files to themes/casual/source/ and modify _config.yml

favicon: /favicon.png

Add_social_links

Just modify _config.yml

social:
  github: http://github.com/littlewin-wang
  twitter: http://twitter.com/littlewin_wang
  weibo: http://weibo.com/fredinweibo

Modify_post_preview_lines_in_home_page

In the post add <!-- more --> tag, the contents of the above will be on the home page preview.

Add_comments

Modify uyan item, value is your uyan id.

# Comment
# e.g uyan: 2128137
uyan: 2128137

Add_local_search

In blog root _config.yml

# Search
search:
  path: search.xml
  field: all

Etc

Modify the site set up time

Add startyear items in theme config


Personal_definition

Install_the_dependencies

In the theme dir, install the dependencies

$ npm install

Modify_the_structure

Change jade files in casual/layout

Modify_the_style

Change scss files in casual/source/scss

Run_build

In the theme dir, run npm run sass

Hexo_gernerate

Then remove the node_modules under the the theme dir. In the blog dir, run:

$ hexo g
$ ...
$ hexo s

Enjoy