Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Use Hexo quickly build and deploy a blog to Github     - MongoDB3.0.6 wiredtiger MMAPv1 (Database)

- CentOS7 boot systemd introduction and use of management (Linux)

- How to Install Suricata IDS on a Linux system (Server)

- Shell scripts get a snapshot of the page and generates thumbnails (Linux)

- How to enable curl command HTTP2 support (Linux)

- Linux remote landing system (Linux)

- Shuffle Process Arrangement in MapReduce (Server)

- Linux regex awk Comments (Linux)

- Linux --- manual release system cache (Linux)

- Ubuntu users install the video driver Nvidia Driver 334.21 (Linux)

- Ubuntu 12.04 install RTL8723BE wireless network card driver (Programming)

- Linux learning portal: CentOS 6.4 system kernel upgrade (Linux)

- How to install Perl modules from CPAN (Linux)

- 25 Git Advanced Skills (Linux)

- Oracle 11g partition maintenance (two) - Coalescing Partitions (Database)

- Orionode source Linux Mint installation (Linux)

- Linux NFS service fixed ports and firewall configuration (Linux)

- CentOS / Linux restart active NIC connection paths / network configure error Error Resolution (Linux)

- 12 Linux Process Management Commands (Linux)

- Arrow keys, backspace key garbled in Python-2.7.5 Interactive Mode under CentOS 5.8 (Linux)

 
         
  Use Hexo quickly build and deploy a blog to Github
     
  Add Date : 2018-11-21      
         
         
         
  This article aims to look at my record by Hexo build a blog, and deploy Github above process, but also for myself to start learning and reference in the future use. Need to see more detail or official document can click Hexo official document to view it.

Installation prerequisites

Hexo installation is very simple. Require pre-installed:

Node.js
Git

After preparing the conditions well you can start the installation Hexo

Installation Hexo

Open Git Bash Run

$ Npm install -g hexo-cli
 

Create a blog

Hexo After installation is complete, run the following commands respectively, Hexo will automatically generate the desired folder

$ Hexo init file address ## specified for you
$ Cd
$ Npm install
For example: the need to build a blog in the local D: \ under my_hexo, respectively, execute the command: hexo init D: \ my_hexo, cd D: \ my_hexo, npm install
After executing the command, if there is no problem we can start to execute commands to see our blog a.


Local preview

$ Hexo server ## to start the service, the default port 4000
$ Hexo server -p xxxx ## custom port to start the service
$ Hexo clean ## clear the cache, the page is not displayed correctly when you can execute this command
Then enter in the browser to access http://127.0.0.1:4000/

Create Repository

Login github top right, click "+", Create a new repository

Create a new repository

Copy just the new https connection: https: //github.com/Admol/admol.github.io.git
Open _config.yml you hexo directory
Setting deploy information, such as:

deploy:
  type: git
  repository: https://github.com/Admol/admol.github.io.git
  branch: master
 

Setting SSH key

Verify that the key exists
Run respectively

cd ~
cd .ssh
And then execute the command ls have been key to view the file, there is generally key words are displayed id_rsa.pub and id_dsa.pub these two documents, nothing will show no key

Add a SSH key

Run (existing key can skip step 2):

$ Ssh-keygen -t rsa -C "your_email@mail.com"

## T specify the key type, the default is rsa, it can be omitted. -C Comment text settings, such as a mailbox or other.
You will be prompted Enter Enter file in which to save the key (/c/Users/you/.ssh/id_rsa): [Press enter, here is enter a file name to save the ssh key, nothing may be lost, We will use the default id_rsa.pub and id_dsa.pub

After a carriage return, you need to enter the password twice (this password is time you push the file to enter the password, instead github password)
After entering the password, see the following information is displayed, add SSH key success.

Github set SSH key

Login github, click Settings, then click on the SSH keys, on this page you can manage all your ssh keys
Then click on the Add SSH key
Open just added key id_rsa.pub file with a text editor, copy all the contents inside
Back github page, copy and paste the contents of the page to just key in the corresponding text box inside, title can easily fill

Test whether to add ssh key success
At the command line, enter:

$ Ssh -T git@github.com

There will be some warning code, enter yes Enter, and then will ask you to enter a password just set, then it will, and you say: Hi, handsome about it ....

This will set up the SSH key

Deployed to Github

Open a command window, back to your hexo blog directory, such as do not execute the following command:

hexo generate
hexo deploy
 

Wait command is finished, you can see if the code has been submitted to the github, then enter admol.github.io browser can access the


New Page

$ Hexo new page 'pageName'
After executing the command that you can see the new page file name is the name of the folder in your local / source directory

Display page

After opening the file can be edited index.md. _config.yml Then open the file (topics that are being used) / themes / jacman directory,
Just add the new page:

menu:
  Home: /
  Statistics: / archives
  About: / about
  pageName: / pageName ## pageName can customize the front, just behind the pageName must write the name of the new page
 

New Articles

$ Hexo new [layout] 'name'
[Layout] is optional, the default is not written post. / File source directory folder name is the name of the layout

Installing Themes

$ Git clone https://github.com/JamesPan/hexo-theme-icarus.git themes / icarus
Change theme

First, download the theme, and then open the _cinfig.yml root directory, modify the theme: To replace the topic name

Modify theme colors

Open _config.yml file / themes / jacman directory, Review:

theme_color:
    theme: 'color value'
 

Modify logo image

Open _config.yml file topic under Review:

imglogo:
  enable: false ## whether to display the logo
  src: img / logo.gif ## logo image address
  favicon: img / qq.ico ## icon in the top left of the page
Upgrade version Hexo

$ Npm update hexo -g
     
         
         
         
  More:      
 
- Kickstart automated installation and deployment RHEL 7.0 (Linux)
- Android Studio 1.0.2 set the memory size (Linux)
- PHP security Programming Advice (Programming)
- How the program is executed (Programming)
- MySQL migration tool used in the production environment (Database)
- Unix system security configuration (Linux)
- Briefly explain the invasion of the four-level denial of service attack DoS Linux server (Linux)
- Ubuntu 14.04 / 14.10 how to install FFmpeg 2.5.1 (Linux)
- MongoDB uses aggregate, group, match mysql achieve in having (count (1)> 1) features (Database)
- The most concise Systemd tutorial, just ten minutes (Linux)
- Linux CPU Monitoring Index (Linux)
- Android main thread message system (Handler Looper) (Linux)
- Compile Android libwebcore.so error occurs when solving (Programming)
- Linux Getting Started Tutorial: Ubuntu laptop screen brightness adjustment (Linux)
- grep command Series: grep command to search for multiple words (Linux)
- Oracle 11g RAC automatically play GI PSU patch (11.2.0.4.8) (Database)
- Python MySQL database connection (Database)
- Ant command-line compiler Android project (Programming)
- Upgrading to MySQL 5.7.9 MySQL 5.6.23 (Database)
- Open source backup software installed on Ubuntu Systemback 1.6.201 (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.