Portfolio site structure: URLs, home page order, and how to write work pages
Once the URL rules are set, do not change them. Each section of a work page covers one point, with an image that proves it.
1. Site map
/ Home page
/work/ Work list
/work/<work-id>/ Work page (core)
/notes/ Note list (can be skipped in the first version)
/notes/<note-id>/ Note page
/about/ About: self-introduction, background, contact
/privacy/ Privacy notice (see the “Privacy” chapter)
/now/ What I'm working on lately (optional; put the last-updated date at the top)
/links/ Link page for social media bios (optional)
/rss.xml RSS (generated automatically)
/sitemap-index.xml Sitemap (generated automatically)
/llms.txt Summary of the site for AI readers (generated automatically; see the GEO chapter)
/404.html Not-found pageURL rules (once set, do not change them, or old links will break):
- Always end with
/: like/work/poster-series/. By default, Astro writes each page asindex.htmlinside a folder, and Cloudflare also adds a trailing slash, so the two agree and the same page never has two addresses. - Write IDs in lowercase English with hyphens: when a Chinese URL is pasted, it turns into a long string of
%E5%AD%B8…, which is hard to read and easy to break. - Do not put dates or sequence numbers in IDs.
- If you really must change an ID, always keep a redirect: add one line to the
_redirectsfile that sends a 301 to the new address. - Plan for more languages: Chinese stays in the root directory, and English will go under
/en/later. All interface text (menus, buttons, date formats) is read from one string file rather than hard-coded in the templates. - Every page has a canonical URL, which is always
https://example.com/...(replaceexample.comwith your domain).
When to use subdomains: split by type; do not open a subdomain for each work. For example, if you later want to host a whole batch of interactive tools, open tools.; for things only specific people should see, open private. (see security safeguards). Things of the same kind go in paths. That way each subdomain needs its access control set up only once, and you will not hit the account’s project limit.
2. The home page, top to bottom
A common and effective order for a portfolio home page:
- Opening: your name, a line about your role, a first-person value statement (“I turn … into …”), two or three buttons (View work / About me / Contact), and a photo or a representative piece.
- Selected work: 3–6 items, each in one row: category · year, title, one sentence, work image, and “View details.”
- All work: filter by category tags (tags show counts). Put the filter in the URL (
?cat=illustration), so that reloading or sharing the link shows the same result. Show everything when JavaScript has not loaded. - About me: two paragraphs of self-introduction, plus one or two facts that back up your experience.
- Latest articles (only if you have some).
- Contact: one sentence inviting people to reach out, plus one contact channel.
- Footer: privacy, RSS, and social links.
A reminder for writing your self-introduction: use the first person. An AI-written self-introduction easily slips into an observer’s voice (“This designer is good at …”) and reads like a press release. It is best to write it yourself and let the AI only help smooth the wording.
3. Work page format (the core)
Each section covers one point, its heading is a complete sentence, and beside it sits an image that proves that sentence. Reading only the section headings should be enough to understand the work.
| Block | What to write | Image to pair with it |
|---|---|---|
| Opening | Work title, one sentence, fact list (my role · date · status · tools · collaborators), main links | Main image for the work, which can be wider than the text |
| 1. Starting point | What problem the work sets out to solve, and what the commission or motivation was | Original state, sketches, reference material |
| 2. Approach | The decisions I made | Process images, annotated details |
| 3. Hardest part | The single hardest thing, and how it was solved | Before-and-after comparison, close-up |
| 4. Results | One visible outcome: launch, exhibition, numbers, feedback | Finished piece, event photos, numbers |
| 5. Limits or next steps | Honestly say where it still falls short | Usually no image |
| Footer | Date, related work, previous / next | — |
- If a work has no result numbers, leave out section 4 rather than forcing one in.
- Put image captions on the image or right below it; one line is enough.
- For collaborative work, state clearly which part is yours, and get the collaborators’ and client’s consent before publishing, especially for unpublished client work.
- Every image needs alt text (
alt): for readers who cannot see the image, and for search engines and AI to read.
Work data fields (stored at the top of each work’s Markdown file):
Title · One-sentence summary · My role · Date · Status · Category · Main image · Links · Featured · Public
Keep these fields as data rather than writing them into the body text. Then the home page cards, the work index, share cards, and structured data can all be generated from one source, and an edit updates the whole site at once.
4. Visual design
- Reading first, with no card-grid dashboard: a full set of rounded cards, each showing a single number, is how product pages and back-office reports look. In a portfolio it turns the work into “a single data cell.” Use cards only on the work index.
- One background color across the whole site; separate sections with white space instead of changing the background.
- One accent color: the interface uses a single color, and color is left for the work.
- At most four font sizes; for body text in Chinese, 17 px with a line height of about 1.8 reads better.
- Write fonts, colors, and spacing as variables (design tokens): to restyle the whole site, change only the variables.
- The look can be swapped out wholesale: split the site into three layers, content (Markdown), data preparation (turning content into the data each page displays), and the look (layout and styles). Content files contain no styling at all. A later redesign only replaces the look layer.
5. Images and video
- Set a load size limit for each page (for example, 1 MB for the home page and 1.5 MB for a work page), check it before launch, and do not deploy if a page goes over. Portfolios are the easiest thing to make heavier over time.
- Convert photos to WebP or AVIF, with a width no more than twice the width at which they are actually displayed.
- For animated work, replace GIFs with short silent videos (MP4/WebM); the same content is much smaller. Set
muted playsinline loop, and play only once it scrolls into view, pausing when it scrolls away. - Do not add
autoplay: in testing, withautoplaypresent,preload="none"has no effect, and the browser loads every video as soon as the page opens. Instead, use a short script that starts each video only when it enters the viewport. For looping videos, also provide a pause button, and when the system has “Reduce motion” turned on, show only the preview image. - A Cloudflare static site has a 25 MiB limit per file: put long videos on YouTube or Vimeo and embed them (embedding raises privacy questions; see Privacy).
- Strip EXIF data from photos before uploading (shooting location GPS, camera serial number); see Site security.
← Previous:Domain setup after purchase: DNSSEC, https, www redirect and AI crawlers
Next:Privacy for a personal site: collect nothing by default, then write a page that says so →
Email subscriptions will open later. For now, you can follow new articles and work with RSS.