Install Node and npm for windows.
12345C:\Users\unshakeable>node -vv6.9.5C:\Users\unshakeable>npm -v3.10.10Install hexo-cli
1C:\Users\unshakeable>npm install hexo-cli -gCheck if hexo-cli is installed properly
123456789101112C:\Users\unshakeable>hexo -vhexo-cli: 1.0.2os: Windows_NT 6.1.7601 win32 x64http_parser: 2.7.0node: 6.9.5v8: 5.1.281.89uv: 1.9.1zlib: 1.2.8ares: 1.10.1-DEVicu: 57.1modules: 48openssl: 1.0.2kCreate “My Blog” directory and CD to it and initiate blog:
123C:\Users\unshakeable>mkdir "My Blog"C:\Users\unshakeable>cd "My Blog"C:\Users\unshakeable\My Blog>hexo initStart Hexo server
1C:\Users\unshakeable>hexo serverCheck Hexo default blog page
1http://localhost:4000/Create new post
1C:\Users\unshakeable>hexo new post <post-title>Publish blog
1C:\Users\unshakeable>hexo generateA public folder will be generated with static site.
- Publish this folder to github.io
Important directories and files:
Templates for draft, page & post:
1234C:\Users\unshakeable\My Blog>\scaffolds- draft.md- page.md- post.mdUser posts directory:
12C:\Users\unshakeable\My Blog>\source\_posts- hello-world.mdMain config file for Hexo blog:
12C:\Users\unshakeable\My Blog>\- _config.ymlNode modules for Hexo:
1C:\Users\unshakeable\My Blog>\node_modulesDefault theme for Hexo:
1C:\Users\unshakeable\My Blog>\themes\landscape
Customization
Update Banner photo
“C:\Users\unshakeable\My Blog\themes\landscape\source\css\images\banner.jpg”Update background-size from “cover” to “55%”
C:\Users\unshakeable\My Blog\themes\landscape\source\css_partial\header.stylUpdate blog’s main config file: C:\Users\unshakeable\My Blog>_config.yml
1234567# Sitetitle: Unshakeablesubtitle: Life Lessonsdescription:author: Mr. Unshakeablelanguage: Englishtimezone: EST