The earliest struggle was with the blowfish template,
Due to issues with npm, opening PowerShell and new Chrome pages in VSCode was lagging.
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 from npm, and after restarting, it returned to normal.
Thinking of not using npm to mess with blowfish anymore, I decided to add a comment feature and chose Twikoo.
I found there were no tutorials to reference. I was also too lazy to research.
Twikoo needs to be run first. It is a standalone 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 doesn't work either. After testing for two days with multiple emails, it still didn't work. I gave up. The emails used were Gmail and GitHub, which also didn't work.
Hugging Face is still usable for now.
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":"Twiko0 cloud function is running normally, please refer to https://twik
"version":"1.6.39"
The blowfish mentioned above has comprehensive features and uses many images, and since we don't use CDN, 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 are different, using either YAML or TOML configurations. At first, I didn't understand and thought it was quite troublesome. After watching the tutorial, it felt quite complex.
I wanted to directly switch to a new repository; actually, just creating a new GitHub repository would suffice.
I directly switched accounts and created a new repository. This is the new source of the problem.
This time, I chose the Hugo Stack template, which looked simple with 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 problems 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 wasting several hours later.
I saw that the .ssh/id_rsa
file only had one. 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 saw that the .ssh/id_rsa
file only had one.
讯飞星火大模型 - AI 大语言模型 - 星火大模型 - 科大讯飞
I could do part of what AI sent me, but some things didn't work.
Edit or create the ~/.ssh/config
file, which is equivalent to declaring or routing table.
# 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 according to the standard, it still didn't work.
The main error I discovered was that when entering the password during the permission step, the displayed RSA was not the id_rsa_2
name I was authenticating with; it was different when I applied.
When pushing with Git, it prompted either permission issues (both wrong and correct passwords are permission issues) or that the repository was not found.
I started recalling the first Git repository tutorial, which was about authentication:
git config --global user.name
git config --global user.email
I also searched using AI.
To revoke global settings:
git config --global --unset user.name
git config --global --unset user.email
The following is the incorrect 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"
You can check if there are still any --global
accounts under global settings with a list command.
If there are none, it's okay.
Then remove the remote repository. second.github.com
is the address after the host in your .ssh/config
, not the address after the hostname.
The format is as follows:
git remote add origin [email protected]:acevsa/acevsa.github.io.git
To confirm the successful link, just check the linked repository name:
git remote -v
Then I proceeded with the 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 name is simple; you can directly bind the domain name to GitHub.
Also, 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 it; otherwise, the deployment environment may be wrong, and you will need to reauthorize.
Vercel and Hugging Face can use a MongoDB.com database; I deployed both.
Cloud functions can register; if they can, register them. You never know when you might use them.
The time wasted is countless, with only a little gain.
Although AI is correct, some punctuation and logic are indeed hard to understand without examples.
So I still need 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 - JianShu
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 - JianShu
Previous struggles article:
npm blowfish hugo – ACEVS
hugo installation – ACEVS
Finally,
Testing the stack of Hugo:
ACEVS