Hello World and Thank You Hexo
2020-11-23

Welcome to my site powered by Hexo and hosted on GitHub! This is my very first post.

Why Hexo and GitHub

I was using and maintaining a homepage on another free hosting site. Through the web interface provided by the hosting site, I can set up a homepage easily and customize it conveniently. It perfectly serves my needs for sharing some info and posts in words. Now, I am thinking of sharing some technical notes that include displays of \(\LaTeX\) formulas and codes.

I am writing markdown documents using Typora and compile my notes with R codes in .Rmd files using RStudio and with python codes in .ipynb files using Jupyter Notebook.

Typora Rstudio Jupyter Notebook

Note: Both .Rmd files and .ipynb files can be exported as markdown-formatted documents.

Also, I prefer not spending extra time on format editing for posting them on my site. The less effort in format editing, the better. Ideally, it would be wonderful if I can directly post the contents of my markdown-formatted documents.

After doing little search online, I find Hexo enables me to publish a post in Markdown and GitHub provides a space for hosting the site. So I decide to move 🚚 and start using the combo 🍔.

Create Your Own Site

If you are thinking of building your own site, there are a couple of things you need to do:

  1. Download and install these two programs in your local PC

    • Node.js [Download Page]

      • npm is distributed with Node.js- which means that when you download Node.js, you automatically get npm installed on your computer.
    • Git [Download Page]

    • Check the program versions in Command Prompt (for Windows) if installations succeed

      1
      2
      3
      4
      5
      # check the version of node.js and npm
      $ node -v
      $ npm -v
      # check the version of git
      $ git version
  2. Register a GitHub account and set up Git in your local PC following this GitHub instruction

  3. Create a site using Hexo

    • Watch Hexo tutorial videos on Youtube

    • Review this Hexo documentation for more info

    • Ask your questions, if any, on this GitHub page or look for an solution in troubleshooting

      1
      2
      3
      4
      5
      6
      7
      8
      9
      # download hexo client
      $ npm install -g hexo-cli
      # check the version of git
      $ hexo -v
      # download hex plugins (example)
      $ npm install hexo-renderer-pandoc
      # initiate a blog
      $ hexo init <type-your-blog-name>
      $ cd <type-your-blog-name>
  4. Choose a theme from Hexo Theme Gallery

Quick Start for Hexo

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment