The earliest hassle was with the blowfish template,
due to npm issues causing lag when opening new pages in PowerShell and VSCode Chrome.
I started uninstalling two newly installed Chrome extensions, but it had no effect, and I didn't restart. The next day, the lag continued.
I globally uninstalled blowfish-tools, and after a restart, it was restored and functioning normally.
Thinking of not using npm to mess with blowfish anymore, I decided to add a comment feature and chose Twikoo.
I found there weren't many tutorials to reference. I was also too lazy to research it myself.
Twikoo needs to be run first. This is an independent module.
It consists of two parts: the database and the deployment environment.
The deployment environment Vercel is blocked.
Cloud Function Deployment | Twikoo Documentation
Netlify requires identity verification, such as an ID card. Magic internet access doesn't work, and not opening it also doesn't work. After testing for two days with multiple emails, it didn't work. I gave up. The emails used for Gmail and GitHub also didn't work.
Hugging Face is still usable at the moment.
Just follow the official tutorial.
mongodb+srv://twname:[email protected]/?retryWrites=true&w=majority&appName=twikoo
In the code, the name in this place is as shown in the image, and the password is also without arrow brackets or quotes. After successful deployment, it will prompt:
"code":100,
"message":"Twikoo cloud function is running normally, please refer to https://twik
"version":"1.6.39"
The blowfish functionality mentioned above is comprehensive, and it uses many images, but we don't use CDN, so there isn't much beautification effect.
I didn't see any tutorials on adding Twikoo to blowfish, so I didn't mess with it.
When switching templates in Hugo, I found that the configuration files differ, using either YAML or TOML configurations. I didn't understand at first and thought it was quite troublesome. After watching the tutorial, it felt quite complex.
I wanted to directly switch to a new repository for deployment; actually, just creating a new GitHub repository would suffice.
I directly switched accounts and created a new repository. This became the source of new problems.
This time, I chose the Hugo Stack template, which looked simple and had many tutorials. Similarly, there are many tutorials for PaperMode and Fixlt, etc.
Hexo has even more template tutorials, mainly about the Twikoo comment system.
I didn't encounter any major issues while searching for information.
The configuration debugging file for the Stack template is set in blog--themes-stack-config.yaml.
I didn't add too many things.
This tutorial added quite a bit.
Hugo Stack Theme Configuration and Usage | Bore's Notes
During this period, I used AI to solve some problems and found AI quite good for coding issues. I trust AI, which is also the root of the several hours wasted later.
I noticed that there was only one .ssh/id_rsa file. I mistakenly copied the original one to another folder (wrong operation) and re-obtained id_rsa.
When pushing with Git, it prompted either permission issues or that the repository was not found.
I asked AI about using two GitHub accounts on one computer with SSH permissions, and it provided the operation steps, which I followed.
When pushing with Git, it prompted either permission issues or that the repository was not found.
I noticed that there was only one .ssh/id_rsa file.
讯飞星火大模型 - AI 大语言模型 - 星火大模型 - 科大讯飞
I could complete part of what AI sent me, but some parts didn't work.
Editing or creating the ~/.ssh/config
file is equivalent to declaring or routing.
# Account 1
Host github.com-account1
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_account1
# Account 2
Host github.com-account2
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_account2
For example, the repo in the image below is your name/name.github.io, which I didn't know.
git clone [email protected]:username/repo.git
git clone [email protected]:username/repo.git
Later I found out that following the standard still didn't work.
The main error I discovered was that when entering the password for the permission step, the displayed RSA was not the id_rsa_2 name I applied for, which was different.
When pushing with Git, it prompted either permission issues (both wrong and correct passwords were permission issues) or that the repository was not found.
I started recalling the first Git repository tutorial, which included authentication:
git config --global user.name
git config --global user.email
I also searched for this using AI.
To revoke global settings:
git config --global --unset user.name
git config --global --unset user.email
The following is the erroneous code:
git config --global --unset user.acevs
git config --global --unset user.acevs
The correct code is:
git config --global --unset user.acevs "personal GitHub account name"
git config --global --unset user.acevs "personal GitHub account email"
After revoking the global settings, I also didn't set local system-level permissions.
git config --local user.name "personal GitHub account name"
git config --local user.email "personal GitHub account email"
Using a list command, I can check if there are still any --global accounts under global settings.
If there aren't, then it's okay.
Then I removed the remote repository. second.github.com is the address after the host in your .ssh/config, not the address after hostname.
The format is as follows:
git remote add origin [email protected]:acevsa/acevsa.github.io.git
To confirm the successful connection, I checked the linked repository name:
git remote -v
Then I proceeded to upload successfully:
git init
git branch -M main
git status
git add .
git commit -m "first commit"
git push -u origin main
git push -u origin main --force
Later, setting up the page to bind a domain is simple; you can directly bind a domain to GitHub.
The actions settings can be simple or complex, depending on how many plugins you have and your needs, which I also skipped.
For Twikoo, if you set a password for the first time, you must remember it and set a password; otherwise, the deployment environment may be incorrect, and you will need to reauthorize.
Vercel and Hugging Face can use a mongodb.com database; I deployed both.
Cloud functions can be registered, and you might use them someday.
Countless hours were wasted, with only a little gain.
Although AI was correct, some punctuation and logic were indeed hard to understand without examples.
So I still had to search for examples.
Hugo setup reference:
Github Pages + Hugo to Build a Personal Blog - Summer of a Nobody
Using Hugo + Github Pages to Deploy a Personal Blog
Building a Hugo Blog from Scratch - Stilig's blog
Using Hugo + Github to Build a Personal Blog for Free from Scratch_hugo github-CSDN Blog
Twikoo setup reference:
Adding Twikoo Comments to Hugo Blog | Sulv's Blog
Cloud Function Deployment | Twikoo Documentation
Twikoo settings reference:
Adding Twikoo Comment System to Static Blogs and Configuring Email and TG Notifications
Hugo Stack theme configuration:
Building a Hugo Blog from Scratch - Stilig's blog
GitHub multiple account SSH setup reference:
Configuring Dual GitHub Accounts on One Computer with Two SSH Keys - Jian Shu
Configuring Dual GitHub Accounts on One Computer with Two SSH Keys_fatal: --local can only be used inside a git repos-CSDN Blog
Multiple Git Configurations with Multiple SSH Keys - Jian Shu
Previous hassle articles:
npm blowfish hugo – ACEVS
hugo installation – ACEVS
Finally,
Testing the stack of Hugo:
ACEVS