Hello World!
I purchased this domain on Spaceship and bound DNS through Cloudflare. As someone who just stepped out of campus, doing all this felt like an 80-year-old looking up words in a dictionary to write a novel. I encountered many unfamiliar terms and processes along the way, and with the help of AI I resolved them one by one — and here I issue my Hello World.
我在Spaceship网站上购买了这个域名,并且通过cloudflare进行了DNS的绑定。当我刚刚迈出校园,做这一切的时候,我觉得我就像是新闻里80岁翻字典写小说的老人。在这个过程中我遇到许多问题,陌生的术语和流程,在AI的帮助下我都一一解决,并且在这里发出Hello World的一声。
Tech Stack
Domain registrar: Spaceship (254.68 CNY) DNS: Cloudflare (0 CNY) Static hosting: Cloudflare (0 CNY) Git: Local repository (0 CNY) Static site generator: Hugo (0 CNY) OS: Linux Mint 22.3 Kernel: Linux 7.0.0-38-generic Architecture: x86-64
购买域名(域名注册商):Spaceship(254.68¥) DNS:Cloudflare(0¥) 静态推送:Cloudflare(0¥) git:本地仓库(0¥) 静态网站生成器:Hugo(0¥) 操作系统: Linux Mint 22.3 内核: Linux 7.0.0-38-generic 架构: x86-64
Process Log
Domain Purchase
I searched for the domain “verifybench” on Spaceship and chose the cheapest price. After browsing through many options, I settled on the cheapest .top domain — only 254.68 CNY for ten years. At first I thought that was enough, but I realized I had only bought the name itself without any pointer (like buying a road sign without knowing where to plant it).
我从Spaceship上搜索"verifybench"这个域名,并且选择最便宜的价格,翻阅了大量的可选域名之后,我选择了最便宜的.top域名,这个域名十年仅需254.68¥,一开始我觉得这样就够了,但是我意识到我仅仅是买了一个域名(名字本身),它还没有一个指向(就像是我买了一块路牌,但是我还不知道把它插在哪里)。
DNS Configuration
Following AI guidance, I went to Cloudflare. Since all the sites were in English, finding things was a bit tough. Luckily I landed directly on the dashboard, otherwise I would have been confused for a while. I tried searching for “Add site” and similar terms but none matched. Eventually I found “Add Domain” and entered my domain (be careful not to mistype, or you have to redo it).
选择免费的套餐即可,之后会扫描现有的DNS记录,对我来说这是一个新的网站,之前的DNS我都将其删除了,之后Cloudflare提供了两个名称服务器(NS地址),对于所有的免费套餐来说应该都是一样的:
后面我在AI的指引下来到Cloudflare网站,因为都是英文网站所以找东西对我来说有点吃力。不过我幸运地直接进入了dashboard界面,要不然肯定还会懵逼一会。首先是添加域名,我试着搜索Add site等,都不太对。直到我发现Add Domain,输入了我的网站域名(注意别输错了,要不还得重新弄一遍)。
Choose the free plan. It then scans existing DNS records — for me this was a brand new site so I deleted all previous DNS entries. Cloudflare then provides two nameservers (NS addresses), which are the same for all free plans:
-
aria.ns.cloudflare.com -
sonny.ns.cloudflare.com
After adding verifybench.top, I needed to go back to the registrar Spaceship to bind the DNS. The DNS binding is in the Domain Manage interface, which took me a while to find. With the help of the interface AI I found it at https://www.spaceship.com/launchpad/ — then Domain Manage, click the domain, and modify under “Nameservers & DNS”. DNSSEC is generally off by default so you can ignore it.
将verifybench.top这个网站加入之后就要回到域名注册商Spaceship处绑定DNS。绑定DNS需要到Domain Manage的界面,但是这个界面我有点挠头不知道在哪,之后借助界面AI的力量发现在https://www.spaceship.com/launchpad/这里面,然后进入Domain Manage,点击域名,然后Nameservers & DNS中修改即可,一般来说都是默认关闭 DNSSEC的,不用考虑这个。
Website Deployment
For deploying a static site, Cloudflare offers Compute: Workers & Pages. There are two modes. The default is Workers — at first I didn’t notice and just uploaded index.html (a web page AI generated for me earlier). Make sure to select Pages below, then upload the index.html file or a folder with index.html at its root.
对于部署静态网站来说,Cloudflare里面提供了Compute: Workers & Pages,在这里可以选择两种模式部署。默认界面是Workers,一开始我没注意看就直接上传了index.html(这是一个我之前让ai帮忙生成的网页文件),要注意在下方选择Pages,然后再上传index.html文档或者一级目录下有index.html的文件夹。
A .dev-suffixed URL is generated where you can browse the index.html. But I hit a 404 error at first. After investigation I learned that Cloudflare sets access restrictions by default. If you want anyone to access it, you need to remove the Access protection.
之后会生成一个.dev后缀的网站,能够浏览这个index.html。但是当时我遇到了404错误,经过一番查找之后得知,是因为Cloudflare默认设置了访问权限,如果你希望任何人都能访问,需要移除那个 Access 保护。
So go back to the Cloudflare dashboard, find Zero Trust, purchase the free plan (I was puzzled why “free” still required PayPal). Then delete the existing protection and the .dev site becomes accessible — this is the test development page.
所以回到Cloudflare的dashboard界面,找到Zero Trust并进入,购买它的免费套餐(虽然我也很疑惑为什么免费还要用Paypal支付),进入之后Delete已有的那个保护,就发现可以正常进入.dev后缀的网站了,这就是测试开发页。
Domain Binding
To bind the test page to your own domain: go to Workers & Pages, enter the project, go to Custom Domains, and add verifybench.top and www.verifybench.top. Then the site is accessible via both domains.
但是要把测试开发页同自己的域名绑定到一起还需要一步,项目和域名之间是一对多的映射,即一个域名只能被分配一个项目,而一个项目可以分配多个域名。到Workers & Pages界面并进入该项目,进入Custom domains添加上verifybench.top和www.verifybench.top,就可以通过这两个域名来访问网站了。
Site Generation
Hugo Installation
We were using a pre-made HTML file, but normally you can publish a website by editing Markdown files. So let’s install Hugo and use it to publish.
现在我们是使用了现成的html文件,但通常是可以通过编辑Markdown文件来发布网站的。所以说安装hugo,并利用hugo进行网站的发布。
Set up network with Clash iKuuu. iKuuuVPN latest domain 2026-09-11
用Clash iKuuu进行网络的配置,iKuuuVPN最新域名 2026-09-11
Clash for Linux’s virtual NIC (TUN) seems to have issues, so I configured temporary environment variables in the terminal:
Clash for Linux的虚拟网卡(TUN)功能似乎有些问题,因此我选择在终端里配置临时环境变量
export http_proxy="http://127.0.0.1:7890"
export https_proxy="http://127.0.0.1:7890"
export all_proxy="http://127.0.0.1:7890"
git config --global http.https://github.com.proxy http://127.0.0.1:7890
First run the nvm install script: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
先运行nvm安装脚本:curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
Then make nvm active in the current terminal:
按照提示让nvm在当前终端生效:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
Then install Node.js: nvm install --lts and set as default nvm alias default node
然后安装Node.js:nvm install --lts并设为默认nvm alias default node
Then go to https://github.com/gohugoio/hugo/releases to find the latest version and download:
然后去https://github.com/gohugoio/hugo/releases找到最新的版本号,下载
wget https://github.com/gohugoio/hugo/releases/download/v0.168.0/hugo_extended_0.168.0_linux-amd64.deb
sudo dpkg -i hugo_extended_0.168.0_linux-amd64.deb
If you installed the wrong one, use which -a hugo to check how many directories appear. If a wrong directory from a previous conda install shows up (let me see which AI lied to me…), just rm it.
如果说安装错了可以用which -a hugo来看有几个目录,如果出现之前conda下载错误的目录(让我看看是哪个AI在坑我……),直接rm就可以
Hugo Configuration
Step 1: Set up local storage
第一步:建立本地存储区域
mkdir -p ~/blog && cd ~/blog
hugo new site verifybench-blog
cd verifybench-blog
git init
Step 2: Install a theme. Browse https://themes.gohugo.io/ and pick one based on your language and interface needs.
第二步:安装主题,这里可以上https://themes.gohugo.io/挑选一下,根据自己的语言和界面需求
git submodule add https://github.com/adityatelange/hugo-PaperMod themes/PaperMod
echo "theme = 'PaperMod'" >> hugo.toml
PaperMod is simple but sufficient for publishing a Hello World post. Switch themes later.
PaperMod这个主题比较简单,但发布 Hello World! 这一条来说足够了,后续再说换主题的事情。
Step 3: Write content.
hugo new content posts/hello-world.md
第三步:编辑内容
hugo new content posts/hello-world.md
Create the document. I installed the maketext editor — run maketext content/posts/hello-world.md to see the contents. Change draft to false to see it on the published site (otherwise only visible in local preview). Type your article content below the +++ at the end.
创建文档,我安装了maketext编辑器,输入maketext content/posts/hello-world.md,就会看到里面的内容,draft改为false才能在发布的网站上看到,否则只能在本地预览看,在最后一行的+++下面输入自己的文章内容
Step 4: Local preview and publish.
After hugo server -D previews successfully, run hugo to build and publish. First-time publish needs Cloudflare authorization.
第四步:本地预览和发布
hugo server -D预览顺利之后就可以构建hugo和发布了,首次发布需要和Cloudflare授权。
npx wrangler login
npx wrangler pages deploy ./public --project-name=verifybench
Note: the project name here must match the test project name above. Otherwise you need to unbind the previous domain-project mapping first and redo the DNS steps.
注意这里的项目和上面测试的项目名称保持一致,否则需要先解绑前面的域名-项目映射关系,再重新走DNS的流程。
Now visit verifybench.top or www.verifybench.top and you should see the hello world title.
这时再登陆verifybench.top或者www.verifybench.top就能看到hello world的标题了
Step 5: Change the theme.
Re-run the theme installation git step to download your desired theme, then edit theme= in hugo.toml to your theme name.
第五步:修改主题
重新执行安装主题的git一步,把需要的主题下载下来,之后编辑hugo.toml中的theme=自己的主题名称即可。
I later used theme = 'hugo-theme-stack'. Unlike PaperMod, Stack has a homepage by default rather than jumping straight to the article list. You can adjust this by going to themes/hugo-theme-stack/config/_default, editing params.toml, and setting mainSections = ["posts"] on the first line.
我后面使用的是theme = ‘hugo-theme-stack’,对于stack这个主题来说,和PaperMod不同的是,它默认有一个主页,而不是直接进入文章列表栏,因此可以进行一些更改,进入themes/hugo-theme-stack/config/_default中,编辑params.toml文件,第一行的mainSections = [“posts”]即可
Step 6: Maintenance.
第六步:维护
cd ~/blog/verifybench-blog
#新建文章(frontmatter 自动生成,记得把 draft = true 改成 false)
hugo new content posts/文章名.md
#写内容(任意编辑器),然后本地预览
hugo server -D
#打开 localhost:1313 看效果,Ctrl+C 退出
#存档(后悔药 + 备份,先 commit 再发布)
git add -A && git commit -m "文章名"
hugo && npx wrangler pages deploy ./public --project-name=verifybench
Closing
Feel free to explore further. This site welcomes submissions, questions, and paid collaborations. To get in touch, email [email protected] and please state your purpose.
其他更多的操作大家可以尽情摸索,本站欢迎《分享投稿》、《咨询问题》、《付费交易》,如想要联系可以发邮件给[email protected],请表明来意。