Use hexo and coding to create a static blog site

background

Due to the nature of work, always wanted to do art recording and share their own learning and growth process, to prove to the world I came. Write articles, post to a blog, start using 51cto, too many ads, people seem very painful; then try a blog Park, less advertising, but it feels right or wrong; followed by a number of well-known technology blog platforms, have not found own favorite.

Decided to build himself a blog, as a operation and maintenance, use 51cto build a wordpress just so easy, but the wordpress support for markdown is not very good, looking awkward. In addition, so you need to have your own server, the cost is a bit high, but also the maintenance, give up.

Know almost go on looking for a bit and decided to build his own blog using free resources. Use coding pages, hexo, hexoadmin establish a static blog site.

At first I deployed on github pages (demo), but access is slow in the country, and can not be included in Baidu.
So he chose the domestic coding (demo), access speed is much faster.

solved problem

  1. Slow access speed
    is switched from the coding pages github pages

  2. markdown picture into
    use map bed combined seven cattle free space, or hexo admin by WangFan combined seven cattle free space.

Text start
system environment: CentOS 7

Installation nodejs

paste image

Node.js is a platform built on Chrome JavaScript runtime for easily building fast response, easy to expand network applications.

Nodejs under Linux installation

Installation hexo


hexo official document
reference 1 hexo install a more detailed
reference 2 the whole process in detail
with reference to 3 build Hexo blog the whole story

theme

I use the next theme, next official documents in great detail, most of the settings can be found.

hexo theme NexT the label and classification

# 创建标签页
$ hexo new page tags
# 创建分类页
$ hexo new page categories

Hexo theme of the next set does not display the full text HOME

The simplest configuration: an increase in the body of the blog

coding pages

paste image
coding official documentation
to build on Coding Hexo personal blog
Hexo static free blog hosting platform deployed to Coding whole process

hexo admin background static blog management program

hexo admin official document

official version slightly shabby, single function.
Simple to use

npm install --save hexo-admin-yf
hexo server
open http://localhost:4000/admin/

hexo admin by WangFan static blog upgraded version of the spooler

It is recommended that an optimized and extended project GitHub , combined with seven cattle, you can quickly insert a picture in the markdown.

Simple to use, details refer to github

npm install --save hexo-admin-yf
hexo server
open http://localhost:4000/admin/

post-maintenance

After the replacement of computer maintenance

  1. Which files are copied do not have to:
    First .git file, whether it is in the site root directory, or file under the .git theme directory, can be deleted.
    node_modules (at regenerates install using npm)
    public (this will regenerate when G with HEXO)
    .deploy_git folder (also regenerate when using d HEXO)
    db.json file
    summary: .git /, node_modules /, public / ,. deploy_git /, db.json files need to be deleted.

  2. Switching to the new copy of the directory folder, using the npm installcommand module for installation. Obviously we are here useless hexo init initialization, no need to use hexo init to initialize a whole and, if not at this time with the hexo init, then the configuration file _config.yml inside the content of the site will be cleared to use the default value,

  3. Install some other necessary components, if any, in node_modules inside, do not repeat the installation of:

npm install hexo-generator-index --save
npm install hexo-generator-archive --save
npm install hexo-generator-category --save
npm install hexo-generator-tag --save
npm install hexo-server --save
npm install hexo-deployer-git --save hexo d来部署
npm install hexo-generator-feed --save 建立RSS订阅
npm install hexo-generator-sitemap --save 建立站点地图
npm install hexo-generator-searchdb --save 搜索

Spread

1 1 hours to prepare a markdown customer support seven cattle uploaded end 1 ( technology articles )
2 Hexo version control and continuous integration
3 online music test
4 Hexo insert background music posture correct music playlist
5 scratch making Hexo theme
6 Yelee using the topic

Guess you like

Origin www.cnblogs.com/hiyang/p/12631871.html