Use coding and hexo quickly build blog

Welcome to my personal blog Pipi pig: http: //www.zhsh666.xyz

Today, we teach you how to use hexo quickly build your own blog. I'm not a professional, do not understand the front-end knowledge, so I really hate those jargon, talk a lot, for white technology, it is like listening to the bible as foggy. So the following content is my own understanding, the language is very popular, it is possible to say that is not so professional, but also look professionals do not spray.
First of all make it clear that the beginning would be more trouble to build a blog, there are many things you may not have heard before, do not be afraid, have patience while watching the tutorial side of hands-on, you will be able to do it! Well, ado, now!

HeXo

hexo is a blog framework, the so-called framework, in order to solve a complex problem and deal structure is, simply put, has been set up with a good framework to build a blog, you do not need to own a brick at a time to construct.

git

git is a version control system. When we want to develop a software, the software has many features to be perfected, so there will be many versions, such as 1.0, 2.0 and so on, but when we upgraded to a higher version, suddenly found a former version easier to use, which time how to do it? So git revision is recorded each time you change happens, when you want to return to a certain former version, then use git directly fallback version had it. At this time you may ask, why do not you ever put it back down version? Would not it be more convenient? The idea is simple, but there are a lot of versions of software, and some software is still very great, so this direct backup will take up a lot of space, it will waste a lot of resources. Also, git detailed information about the software revision will be recorded, including the revision of the time, which files have changed and so on, so use git management development is very convenient, this is the future trend. Note that, git need to use the command line management.

GitHub and coding

Both version management system is online, you can understand git for online, but also the nature of their community. The difference is, GitHub is abroad, can also be said of the world, because there are many large cattle contribute their open source code above, including Google, Apple, Microsoft, and so on world-class engineers, software developers in the above, there will be more Daniel give you more advice to help you complete the development. The coding is China's, relatively speaking, more fame weaker, but faster access speeds, can also have a private warehouse free. So, in this tutorial we use the coding pages deployment blog. (Note: coding has been acquired by Tencent cloud)

You need to download something

1.git

2.node.js

3.notepad++

4.hexo

(This requires command-line git download, no installation package, you need to create a new folder in one computer's disk, can easily take names, such as hexo, used to store your blog code into this folder, right, you will see git bash hexo options, click, you enter the git command line, enter the command npm install hexo-cli -g, wait a moment, a bunch of English appears below, it has been downloaded hexo prove it!)

hexo steps are not repeated, all in the previous blog in point here Jump

Step1: At this point we need to create an account coding (Note codding has been acquired by Tencent cloud, click here to jump ), then add a project, the project called coding your account name, for example, my account name is Zevs6, so I the new project is Zevs6, pay attention to it a tick in the project initialization

Step2: enter Project -> Settings -> deployment of public key -> New Deployment spoons, add items to the public key SSH, ssh public key acquisition method, like github and can be directly found using locally blog before jumping point here first there are four steps in detail. Public key name can not fill, but the push to grant permission option must be ticked, so you have write permission

Step3: 在你的域名管理平台中(比如阿里云,腾讯云之类的),域名 ->管理-> 解析域名,增加一条CNAME信息,记录值为 youruser.coding.me(youruser为你的coding用户名)例如我的:

Step4:等到第三步的解析生效(最长十分钟),在coding中,项目 -> 代码 -> Pages服务中,一键部署Pages。在Pages的设置里,自定义自己的域名并绑定(域名前加www.前缀)

Step5:在本地博客路径下,修改_config.yml下的deploy,改为:

deploy:
  type: git
  repo:
      coding: [email protected]:yourname/yourname.git,master

格式一定要正确!!!不然会报错!!!

Step6:

​ 在本地博客路径下,执行命令:

hexo clean
hexo g
hexo d

hexo d 部署成功时会提示然您输入账号密码验证

Guess you like

Origin www.cnblogs.com/zhsh666/p/11432965.html