Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the Hexo-Git-Backup plug-in to back up the Hexo blog

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article shows you how to use the Hexo-Git-Backup plug-in backup Hexo blog, the content is concise and easy to understand, can definitely make your eyes bright, through the detailed introduction of this article, I hope you can get something.

Because the Hexo blog is statically hosted, all the original data is saved locally, if one day the computer breaks down, or if the local data is deleted by mistake, it is called heaven and earth that should not work. Regular backup becomes more important at this time. The common backup methods are: save the data to a USB disk, cloud disk or other place, but the god has long developed a backup plug-in: hexo-git-backup All data, including theme files, can be backed up to github with only one command.

First, enter your blog directory and enter the command hexo version to view the Hexo version. As shown in the figure, my version is 3.7.1:

Install the backup plug-in. If your version of Hexo is 2.x.x, install it using the following command:

one

$npm install hexo-git-backup@0.0.91-save

If your version of Hexo is 3.x.x, install it using the following command:

one

$npm install hexo-git-backup-save

Add the following configuration to the _ config.yml configuration file in the root directory of the Hexo blog:

one

two

three

four

five

six

seven

Backup:

Type: git

Theme: material-x-1.2.1

Message: Back up my www.itrhx.com blog

Repository:

Github: git@github.com:TRHX/TRHX.github.io.git,backup

Coding: git@git.dev.tencent.com:TRHX/TRHX.git,backup

Parameter explanation:

Theme: the name of the theme you want to back up

Message: custom submission information

Repository: warehouse name. Note that a branch name should be added after the warehouse address. For example, I created a backup branch.

Finally, back up your blog with the following command:

one

$hexo backup

Or you can use the following shorthand command:

one

$hexo b

After the backup is successful, you can see the original files under your warehouse branch:

The above is how to use the Hexo-Git-Backup plug-in to back up the Hexo blog, have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report