Memo: Record the build process
1. Install git
right mouse button--open git Bash open command line
Configure Git (To have a GitHub account: name)
$ git config--global"name"
Configure GIT's global user information (you can see which user, which mailbox submitted it)
$ git config--global"[email protected]"
Generate secret key:
" [email protected] "
(enter)--set password, can write not write (enter)--Confirm password again (carriage return)
Generate a secret key that interacts with GitHub to transfer data, using SSH
Files are saved under directory C:\Users\username\.ssh (id_rsa< private key > and id_rsa.pub< public key >)
id_rsa.pub, to submit to GitHub , copy the contents
To GitHub's setting SSH keys--->add SSH key--->title random,key paste the contents of the public key---add
Check if SSH is configured successfully
$ ssh-t [email protected]
Success will show: Hi name! You ' ve successfully authenticated,but Github does not shell access.
2.ruby
Install Rubyinstall---English----G:\ruby21-x64 Tick The second add to environment variable added Ruby executables To Ypur PATH---install installation
Open git Bash to see the ruby version:
$ ruby-V
The version information appears stating that the installation was successful.
Ruby wants to work with the Devkit.
Extract to G:\devkit---Extract extract
Associating Ruby with Devkit
In folder G:\devkit with a dk.rb file and config.yml, open git Bash
Initialization
$ Ruby DK.RB Init
Post prompt message: Found Rubyinstaller in the G:\ruby21-x64 Directory
If not found can also be modified, with the VI Editor to open the file config.yml:
$ VI config.yml
The vim that starts with # is a comment, below Add the correct ruby directory- G:\ruby21-x64
Installation:
$ Ruby Dk.rb Install
Prompt two information, stating that no problem, if not come out, indicating that CONFIG.YML is not configured well, open CONFIG.YML self-configuration can
3.Octopress
- Clone octopress to local git clone git://github.com/imathis/octopress.git octopress
- Further environment configuration, install dependency gem install bundler and bundle install
- Install and use the default theme
Official website: http://octopress.org/page bottom link start here
Open git Bash and clone the octopress source code on GitHub to the desktop Octopress folder:
Open folder (target: Generate source and public folder):
$ CD octopress/
Go to the Octopress folder, everything under the octopress root directory
- $ gem Install bundler (RubyGems has always been very difficult to access at home, so temporarily do not operate this, first modify the configuration)
- Reference https://gems.ruby-china.org/,https://ruby-china.org/topics/29250
First modify the software source to add the software source (a:append):
$ gem sources-a https://gems.ruby-china.org/ If you encounter an SSL certificate problem and you cannot resolve it, please use http://gems.ruby--A/HTTP gems.ruby-china.org (My source)
Remove the default software source (R:remove):
$ gem Sources-r https://rubygem.org/
To view the software source:
Open File Gemfile Modify the source of the software inside:
Enter I into insert mode i:insent under VIM
The first source "https://rubygems.org" changed to a domestic available software source "http://gems.ruby-china.org"
Press ESC to enter command mode : Wq Save and exit
After you have modified the software source, you can use it.
$ gem Install bundler
to perform the bundler installation and see successfully you can do it.
Install bundler inside the package:
Install OCTOPRESSC:
Appears mkdir-p source mkdir-p Sass Mkdir-p source/_posts mkdir-p Public
Generated:
Generating Site with Jekyll
Open the public file see there is a static blog site
Local open Server Preview Port 4000 accept request localhost:4000
Slow load: Look at the browser Network load failed file is jquery
Open octopress-->source-->_includes-->head.html-->src:googleapis.com Change to domestic // libs.baidu.com/jquery/ ...
Open command line local browser stop Buttonx
Open git Bash to regenerate the site because it changed the source file inside
$ Rake Generate (carriage return) generation
$ Rake Preview (enter) to open a local server preview localhost:4000
octopress Build Static blog site environment configuration