Hexo Series: Creating a standalone blog with Hexo+github

Source: Internet
Author: User
Tags ssh

Introduction: Cattle are not cattle use personal blog, I also follow the trend, the main individuals also like Hexo this simple blog, to experience a ....

Note: This is a tutorial under Windows


1. Install git download address: Git download address installation Just don't say that everyone will.



2. Download Nodejs, install NPM package (latest Nodejs version default install NPM)


Download Address: Website link nodejs Chinese web

I installed in Win10 under the problem: 2503, 2502 Error, the cause of system permissions

Workaround:

1). Press WIN+R, open the Run box, enter command: gpedit.msc, open the Local Group Policy Editor, expand: Computer Configuration, Administrative Templates, Windows components, Windows Installer

, and find "Always install with elevated privileges"; Double-click the option, or right-click Edit, set to Enabled in the popup dialog box, and apply

2). Press Win+x to enter the command prompt (Administrator), enter: Msiexec/package + ' msi file path ' (note the half-width character when entering and the path cannot be Chinese name)

Example: C:\windows\system32>msiexec/package G:\MyBlog\nodejs\node-v6.5.0-x64.msi

can be installed successfully. 3. Installing Hexo

NPM Install Hexo-cli-g
4. Create a Hexo directory
Create the folder where the blog file is placed: Hexo folder. Create a folder in your desired location, such as the location of my Hexo folder is E:\hexo, the name and place are freely selectable,
Of course, it is best not to put in the Chinese path, as for the reasons, I think many people understand. After entering the folder, that is inside the E:\hexo,
Click the right mouse button, choose Git Bash, execute the following command, Hexo will automatically download all the files needed to build the site under this folder.
5. Can now be debugged locally
Hexo generate #生成, abbreviated to Hexo G
Hexo server   #启动服务, can be abbreviated as HEXO s


Now that the local is set up, the next step is to deploy to Gitcafe.
6. Modify Hexo, deploy to Gitcafe1). Registered account: Https://coding.net 2). Create Project: The project name needs to be the same as the user name 3). Add SSH key right: Git Bash input: ssh-keygen-t rsa-c "BossRain99@163.com" (This is your own mailbox)

When the Ssh-keygen is generated, the input file name is queried, and this direct return is by default.

Set the password as you want. The default is to generate id_rsa,id_rsa.pub two files in the local ~/.ssh directory,

Id_rsa is the private key, and Id_rsa.pub is the public key.

Open id_rsa.pub to copy the content to the SSH keys settings in Gitcafe


4). Modify the _config.ym file to change the last deploy configuration to your own.

Deploy:
type:git
repository:git@gitcafe.com:raincoder/raincoder.git
branch:gitcafe-pages

Problems encountered here:

ERROR Deployer not found git
Installing the deployment plug-in
Workaround: npm Install Hexo-deployer-git--save

Questions about SSH Public key configuration and GIT operations are addressed here in detail:

Git Operations FAQs SSH Public key configuration


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.