Introduction
When I got a new computer and was bored, it occurred to me that I hadn’t updated my blog for a long time, so here is this post.
Analysis
Looking back at the blog, it uses hugo framework, and the source code is still in my GitHub repository, so I need to use Git to clone the project, and then since it is a blog of Hugo framework, I need to install Hugo**, the image is stored in SMMS website, no need to download it.
Install Git
There is nothing to say about installing Git, it is installed in D disk, the address is as follows: Git Installation Address, always default to the next step on the line.
Configure your username and email
After the installation is complete, you need to configure your username and email.
Why do I need to configure my username and email?
This information is used every time git commits, and it is recommended that you use the same GitHub username and email address.
|
|
** –global** means that this command works globally, i.e. all projects will use this username and email.
Setting up SSH
Right mouse button, click on Git Bash and type the following command:
|
|
You can go all the way back to the Enter key, or you can set up the storage location D:\Programs\Git\.ssh\id_rsa
as shown in the picture below. (You need to create your own folder D:\Programs\Git\.ssh
to be able to)
Configuring the proxy
Since the operation may fail or be slowed down due to the network when clone is performed, we set up a proxy here.
Open the C:\Users\ your username
folder, find the .gitconfig
file, and add the following:
|
|
Bind to Github
Open Github, click on the avatar, click on Settings
, click on SSH and GPG keys
and add a new SSH key.
End of installing Git
Installing Hugo
The Winget
installation method is used here.
Winget
Winget is Microsoft’s official free and open-source package manager for Windows. To install the extended edition of Hugo:
|
|
To uninstall the extended edition of Hugo:
|
|
Note!
If you are a Windows
user:
Do not use command prompt (cmd)
.
Do not use Windows PowerShell
.
Run these commands in PowerShell
or a Linux terminal
(such as WSL
or Git Bash
).
PowerShell
and Windows PowerShell
are different applications.
If you happen to be using vscode, you can set it up like this:
End of installing Hugo
Now that all the preliminaries are done, feel free to blog!
Appendix
Reference
Copyright information
This article was originally published in CaiHongTu Blog and follows the CC BY-NC-SA 4.0 agreement. Please keep the original source when copying.