← 返回網誌

我點樣用 AI 整網站

2026-07-13

我點樣用 AI 整網站

我唔會教你點樣 set up Hermes Agent 配一個 LLM。呢度講嘅大部分嘢喺普通嘅 chatbot 都做到。我想做嘅係帶你走一次我用 AI 由頭到尾整一個網站嘅過程。

我嘅 Setup 同使幾多錢

我用嘅嘢:

  • Hermes Agent — 免費,開源嘅 AI agent,喺你自己部電腦度行
  • DeepSeek V4 Pro — 大約 USD 20/月,唔使 VPN 最平嘅可以處理 coding 嘅 LLM
  • GLM-5.2 via OpenRouter — 大約 USD 50/月,coding 嘢比 DeepSeek 更可靠

Programming code on a computer screen

除咗 AI 工具之外,經營一個網站仲有其他開支:

  • 域名 — 大約 USD 10-15/年(我用 Porkbun)
  • VPS(虛擬專用伺服器) — 大約 USD 5-10/月(即係租一部喺網絡上面嘅電腦嚟放你個網站)

了解一個網站係由咩組成

正常一個網站係由前端(訪客見到嘅嘢)、後端(令網站運作嘅邏輯)、數據庫(儲存任何資訊)、同埋其他令網站行到嘅嘢(版本控制、分析、安全、部署、DNS、主機、備份、日誌)組成。

叫 AI 整網站,佢多數會俾你前端嘅 code(HTML、CSS、JavaScript)。載入冇問題、行到,但係佢只係喺你部電腦上面,冇人見到。如果你有聯絡表格,佢都未行到,因為需要後端邏輯先可以運作。

如果你個網站有付款功能或者會員制,你好可能需要一個數據庫嚟記住用戶同交易資訊。

無論你個網站係關於咩,你都需要部署到一部 VPS 上面(即係租一部喺網絡上面嘅電腦)。就好似你租一個舖位做生意咁,你唔會喺屋企做生意。主機、DNS、少少網絡知識都係呢度嘅。你可以叫你嘅 AI agent 幫你搞,但係個人嚟講,我未信到佢可以搞掂呢啲嘢。每個服務供應商都有唔同嘅細節,唔係每個 AI model 都學過點樣處理。

Artificial intelligence concept

寫個大約嘅計劃

而家你知道一個網站係由咩組成,我哋可以開始寫個計劃:想達到咩目標、技術規格係咩、有咩 page、唔想個 agent 做咩。

我會留低一啲 comment,唔會放喺個計劃入面。呢啲 comment 係用嚟解釋術語同埋點解我要做某啲嘢。

以下係我整我自己個 portfolio 網站嘅計劃:

Goal: Build a one page portfolio website for me as a freelance web developer serving SMB, SE clients in Hong Kong.

Tasks:
- Break down the project into small, manageable tasks
- QA test at the end of each task

Technical specifications: # These are what I use to build a website
- Django for backend
- Tailwind and HTMX for frontend. Minimal Javascript usage
- Contact form to send out email.
- Rate limit the sending of the contact form
- Sanitize user inputs in the contact form
- Create a log for everything
- Use Plausible for analytics
- Ping me on Telegram if it encounters an error # I usually forget about it after the website is deployed and only by pinging me on Telegram will I notice any errors

Do not do the followings: # It's as essential to tell your AI what not to do as it is to tell it what to do
- Do not touch git
- Avoid using technical jargons
- User authentication and paywall are not needed

Follow the layout: # This is a layout that maximises building trust and conversion
- Hero with headline, subheadline and two action buttons
- Portfolio section showcasing the 33 industries I have in my portfolio
- Service. Display as cards. Use layman terms.
- FAQs
- Contact form
- Footer

Design
- Load the frontend-design skill and use the brutalist/industrial design # AI agent has skills, which are pre-defined instructions to carry out different tasks. It's perfect for me as I am more of a backend guy who has no taste when it comes to design

Deploy
- I will handle version control (github), deploying and managing domains on my own

跟住我會叫我嘅 AI agent 俇回饋。

Website design on screen

將計劃階段同開發階段分開

當 AI agent 明白你想要咩,你又滿意個計劃,就開一個新 session。

開新 session 可以令你嘅 AI agent 唔會被之前對話講過嘅嘢搞亂。根據我自己嘅經驗,咁樣可以更有效率咁完成開發過程,因此慳返啲錢。

揀 LLM model 同 AI agent

Claude 同 ChatGPT 喺香港係出名貴同埋要 VPN 先用到。如果 Claude 或者 ChatGPT 有任何改動,你可能會冇咗 VPN 連線,用唔到個 agent。而且佢哋極之昂貴。如果無人看住,佢哋可以好快洗你一大筆開發費。

我揀最平同最容易用到嘅。我覺得 DeepSeek V4 Pro 做得唔錯,佢係唔使 VPN 最平嘅 LLM model 之一。佢唔係完美,但係簡單嘅 coding 任務佢搞得掂。

另一個 coding 用嘅 LLM model 係 GLM-5.2,貴少少但係 coding 嘢比 DeepSeek 可靠好多。

兩個 LLM 都可以經 OpenRouter 輕易用到。

Server hosting infrastructure

將你個網站放上網

好,而家整完喇。你 check 過個網站,滿意。係時候部署。

以下係一個 checklist:

  1. 買一個域名,邊度都得。我用 Porkbun,易用。域名就係 yourcompany.com。使費:大約 USD 10-15/年。
  2. 搵一部 VPS 放你個網站。VPS 即係虛擬專用伺服器,基本上就係一部用嚟放你網站嘅電腦。使費:大約 USD 5-10/月。
  3. Save 低你嘅嘢 — 將你嘅檔案 commit 上 GitHub。咁樣如果整錯嘢想返轉頭,你喺 GitHub 上面有之前嘅 code。就好似打機打大佬之前 save game 咁。
  4. 將你個網站上傳到 VPS
  5. 設定 DNS(A/AAAA、CNAME、NS、TXT 記錄)。呢個係令到當有人打 "yourcompany.com" 嗰陣,部電腦可以將佢轉做你部 VPS 嘅 IP 地址。
  6. 搞一個 SSL 證書。即係你個域名前面嗰個 "https"。意思係傳輸已經加密咗。如果你收客嘅信用卡或者其他敏感資訊,呢個係非常重要嘅,不過喺 2026 年呢個已經係基本要求。 7.將你個網站加入 Google Search Console,咁樣當有人搵你公司名或者某啲字眼嗰陣,你個網站就會出現。

Business professional workspace

總結

以上就係我用 AI 整網站嘅確實步驟。重點係將計劃階段同開發階段分開做唔同嘅 session。我就係咁樣一晚整咗 132 個 demo 網站出嚟。