banner
ShuWa

ShuWa

是进亦忧,退亦忧。然则何时而乐耶?
twitter

A Simple Guideline to build your own Blog

Welcome to My Blog! This is my very first post. In this post, a simple guideline of using Hexo and fluid to build and beatify your own Blog will be provided. If you have any question, please check the Hexo offical document and Fluid offical document for more detailed information.

The Environment#

Install Git#

Download Git in the offical website: Git - Downloading Package.

Install Node.js#

Download Node.js in the offical website: Download | Node.js.

Init Hexo Project#

Install hexo-cli#

$ npm install -g hexo-cli 

Init hexo project#

$ hexo init blog 

Create a new post#

$ hexo new "Post Name"

More info: Writing

Run server#

Show the website in localhost.

$ hexo s

More info: Server

Config deployment#

Open the file _config.yml in folder /themes and modify the deploy part as follows:

deploy:
    type: git
    repo: 'your repository URL'
    branch: master

Save the configuration file#

$ npm install hexo-deployer-git --save

Clean static files#

$ hexo clean

Generate static files#

$ hexo g

More info: Generating

Deploy to remote sites#

$ hexo d

More info: Deployment

Using Theme Fluid#

Install Fluid#

If your Hexo version >= 5.0.0, you can install Fluid via Npm:

$ npm install --save hexo-theme-fluid

Then create _config.fluid.yml in the blog directory and copy the content of _config.yml in Page.

Set theme#

Edit _config.yml in the blog root directory as follows:

theme: fluid

Create about page#

The about page needs to be created manually:

$ hexo new page about

Then edit /source/about/index.md and add layout attribute.
The modified example is as follows:

---
title: about
date: 2020-02-23 19:20:33
layout: about
---

About content

More configuration#

For more information, please visit the Offical document.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.