编程知识 cdmana.com

It is very convenient to use ECs to build a drawing bed and hexo one click deployment

Hello everyone , This is Wang Feng, a programmer .

Recently, I am building a personal website :www.python-office.com, Need to use a drawing bed , To store images and other files that are used by multiple pages .

This time I choose cloud server + Hexo Build the framework .

Equipment and technology used

Steps to build

1、 install node Environmental Science

This step belongs to the basic operation , Direct Baidu , I won't go into details here .

2、 start-up hexo project

      
      
newly build hexo project
hexo init hexo-demo

Get into hexo-demo Folder , Installation dependency
cd hexo-demo
npm install

Run the project
After installing dependencies , Execute the following command , start-up hexo The server ,
hexo server
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.

The operation results are as follows . Demo page ​ ​ Portal ​

 Using ECs to build a drawing bed ,Hexo One key deployment , It's so convenient _python

3、 Add images

Put your picture , Add directly to hexo Under the project of source Folder is ok .

      
      
[[email protected] source]# pwd
./hexo-demo/source
[[email protected] source]# tree
.
|-- 1-wemedia-group.jpg
|-- 2-free-group.jpg
|-- 3-finance-group.jpg
|-- 4-cq-group.jpg
|-- cartoon-img.jpg
|-- github-nav.jpg
|-- icon.jpg
|-- img2cartoon-error.jpg
|-- _posts
| `-- hello-world.md
|-- python-office.jpg
`-- qrcode.jpg
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.

4、 Advanced : collocation supervisor、nginx More suitable for

Complete the above tasks , This simple drawing bed can already be used . If you want to make the project more automated 、 Easy access , It can be matched with the following 2 One technology :

  • supervisor: It runs automatically in the background hexo project .
  • nginx: take hexo The access address is linked to your own domain name , For example, I :​ ​./api/img-cdn/python-office.jpg​

At the end

This kind of drawing bed , It is suitable for the situation that your server is rich in resources .

If you have any questions about the article , Welcome to the comment area to communicate with me ~

版权声明
本文为[51CTO]所创,转载请带上原文链接,感谢
https://cdmana.com/2022/174/202206231833087366.html

Scroll to Top