Building your own portfolio site: what to decide and what order to do it in
An Astro static site on Cloudflare: the overall architecture, what to decide before you start, the order of work, and the costs.
This series is the research and launch record from when I built wizerdbache.com, organized so that a general reader can follow it. The domain sits on Cloudflare, the site is a static Astro site, and an AI assistant helps write the code. Each chapter covers one topic, so you can read them in order or jump straight to the one you need. Every approach has been tried on my own site; where something has not been tested, the text says so.
The short answer
- How it is built: an Astro static site hosted on Cloudflare Workers. The domain, hosting, and HTTPS all sit in the same account. Hosting is free, and your source files stay on your own computer and in git.
- Shape of the site: portfolio first. The home page shows the work up front, each piece gets its own page, and articles, the about page, and contact are supporting material.
- Four things to handle before launch:
- Privacy: collect nothing by default, then write a page that says so clearly.
- Traffic analytics: optional. If you add it, pick one that does not use cookies.
- Security: turn on two-factor authentication for your accounts, run a secrets scan before launch, and strip GPS data from work photos first.
- GEO: write titles as the question a reader would ask, and let the site generate a sitemap, share cards, and
llms.txtautomatically.
- Order of work: set up the domain first, then put up a blank home page, settle the site structure, add 3 to 5 pieces of work, and only make the site public once the pre-launch checklist is fully passed.
1. Overall architecture
Your domain (bought on Cloudflare)
└─ Cloudflare account
├─ DNS, HTTPS certificates, redirect rules ← a few clicks in the dashboard
└─ Worker (hosts the static site) ← the AI assistant deploys with Wrangler commands
└─ dist/ folder built by Astro
↑
Your computer: site source (Markdown + images) kept in git- Static site: the site is a set of pre-built HTML files, with no database and no login system. There are fewer places to attack, hosting is free, and it will still open ten years from now.
- Astro: it turns the works and posts written in Markdown into HTML using templates, and also generates RSS, a sitemap, and share cards. For a portfolio site it is a good fit, with no need for the whole React stack.
- Workers instead of Pages: both can host a static site, and Cloudflare now recommends Workers for new projects. There is another reason, related to privacy: a Pages project always comes with a public
<project-name>.pages.devaddress (<project-name>is your project name) that cannot be turned off, whereas theworkers.devaddress of a Workers project can be turned off. Later, for private pages meant only for specific people, Workers is less likely to leak.
2. Decisions to make first
| Decision | Recommendation | Notes |
|---|---|---|
| Site format | Portfolio first, with articles as support | The home page shows work first; articles and notes can be added later |
| Language | One language to start, with URLs reserved for more | Going bilingual roughly doubles the work. The reserved setup: Chinese at the root, with English later under /en/ |
| First batch of work | 3–6 selected pieces, with the rest listed on the work index | Start with pieces that clearly explain “what I did and where it was hard”; more is not the goal |
| Visual style | Light, reading-focused, one accent color | The interface uses one color only; leave color to the work images |
| Font | One variable controls the font for the whole site | Changing the font takes one line. Check that a Chinese font’s license allows commercial use and web publishing (for example, Source Han Sans is under the SIL OFL license) |
| Newsletter | Skip it for now; offer only RSS and a placeholder | Connect a newsletter service once you have a regular publishing schedule |
| Traffic analytics | See Traffic analytics | Can be skipped entirely |
| Contact | One social account or a dedicated email address | Do not use your private main email. If you want a domain email, see After buying the domain |
3. Order of work
- Buy the domain (Buying your own .com domain on Cloudflare): gather your details, choose the number of years, and check out.
- Set up the domain (After buying the domain): DNSSEC → put up an “under construction” page → force HTTPS →
www.redirects to the main address. This can be done within half a day. - Site skeleton (Site structure and work pages): the site map, the work page format, and the layout. Build three template pages first (home, work page, article page), review them, then apply the design across the site.
- Add content: 3 to 6 work pages, an about page, and a privacy page (Privacy).
- Pre-launch check (Pre-launch checklist): once everything passes, remove
noindex, then make the site public. - One to two weeks after launch: see which crawlers have visited, then decide whether to block AI crawlers. You can also decide whether to add traffic analytics at this point.
4. Costs
| Item | Cost | Notes |
|---|---|---|
| Domain | Annual renewal fee (a .com on Cloudflare is about US$10–12 at cost price, with the same price on renewal) | Make sure auto-renewal is on, since an expired domain can be registered by someone else |
| Hosting (Workers static site) | Free | Requests for static files are not charged |
| HTTPS certificate | Free | Issued automatically when you connect the domain |
| Private pages (Cloudflare Access) | Free for up to 50 people | The first time you open Zero Trust, you may need to enter payment details |
| Traffic analytics | Free to start | See Traffic analytics |
5. What this series does not cover
- Choosing a newsletter service, paid memberships, and online courses: the first version of a portfolio does not need them.
- Back-end features (comments, form emails, member sign-in): when you need them, handle privacy and security separately. Privacy and Site security both include reminders.
Next:Buying your own .com domain at Cloudflare →
Email subscriptions will open later. For now, you can follow new articles and work with RSS.