The effect

  • Blog address:My blog
    • PC side effects
    • Mobile effect

  • Recently took time to finally build the completion, there are a lot of information on the Internet, this article only records the problems encountered, if you want to build a blog! It might help you.

Hexo+GitHub

  • Now there are many on the network, there are a lot of articles written very well, here recommend two articles! As long as follow this step, basically can complete! There’s no technical difficulty, just physical exertion
    • Hexo+GitHub Pages
    • HEXO+Github, build your own blog

The domain name

  • Domain name I am in Ali cloud buy ali cloud
  • Enter the domain address you want to buy, as shown in the picture! Choose a domain name that suits you, add it to the list, and buy it
  • This is a voucher for Aliyun! Ali Cloud voucher
  • Purchase successful. Go to the domain console
  • Click Parse Settings, then add records, and the following window will appear
  • Set the value to the following
    • What is this record value? As shown in the figure, it is:https://shimingli.github.io/ipValue, of course you need to set it to yours
  • The setting is complete, there is a key step, is the real name authentication, authentication passed, domain name can be used.

GitHub PagesThe setting of the

  • Into thename.github.ioProject directory, and then enterSettings, and finally locate toGithub PagesThe option, input your own domain name purchase, I this domain name 7 pieces a year, value for money!

Topic selection

  • What are the great Hexo themes
  • I’ve seen a few personally, but I still like this One. I feel a little stuffy
  • cloneTo the local
git clone https://github.com/MOxFIVE/hexo-theme-yelee.git themes/yelee
Copy the code
  • Please refer to the official documentation for detailed instructions on how to use the Yelee theme.

    • public:pulltoGithub
    • themes: The theme of the blog
    • soure: Is where the articles are kept
  • Then put the Clone yelee in the Themes directory

  • Set it in the root directory of your blogtheme: Yelee
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: Yelee
Copy the code

HexoSeveral common commands

Hexo server (hexo s) Generate (hexo G) generate a static file that will generate a new folder called public in the current directory Hexo deploy (Hexo D) deploys the blog to the remote server Hexo New"postName" # Create new article
hexo new page "pageName" # create a new page
Copy the code
  • Abbreviations:
$ hexo n == hexo new
$ hexo g == hexo generate
$ hexo s == hexo server
$ hexo d == hexo deploy
Copy the code
  • If everything is ok, open http://localhost:4000/ and you can see the local blog you just set up, Hexo will generate a Hello World blog post by default.

Problems encountered

  • HexoIn theYeleeTheme, home page does not show the article, need to putthemesThe files in the_config.ymlthesearchIn theon: trueComment out, and must comment outonloadIn the meantime, you need to install plug-ins! And then you can retrieve it.
# Local Site Search | Local Site Search
# # Insatall below the plugin to take effect | using search need to install plugin
## https://github.com/PaicHyperionDev/hexo-generator-search
search: 
  on: true
  # onLoad: false (Yelee theme in Hexo, home page does not show articles)
  ## true: get search.xml file when the page has loaded
  ## false: get the file when search box gets focus
Copy the code
  • The article moretags, need to use[], which are separated by commas
[Go,WebSocket] [Go,WebSocketCopy the code
  • md, the file is sensitive to space, as shown in the figure.
    • Through the commandhexo gThe following error message is displayed when the command is executed
  • For a summary of the article, use the
    , you can use the following methods
-- WebSocket date: 2018-07-15 16:02:08 Tags: [Go,WebSocket] -- The final effect is as follows! [Information uploaded on the Web](https://upload-images.jianshu.io/upload_images/5363507-1df3bbfdd7b78fff.png? imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) ! [Printed information obtained on the Web side](https://upload-images.jianshu.io/upload_images/5363507-394f230f0c32cdab.png? imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) <! -- more --> ! [Server-side code implementation](https://upload-images.jianshu.io/upload_images/5363507-1c4e57241edf86c4.png? imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)Copy the code