Build your first website · Lesson 04

Build Your
First Website.

Getting started with Astro and Codex. Create a real website on your computer, preview it locally, and make your first creative changes—without writing code yourself.

Complete beginner≈ 60–90 minutesNo coding required
A photography website being created with Astro and Codex on a laptop and previewed on a phone
Lesson 04Astro structure · Codex assistance · Your direction

Your goal

From a folder
to a local website.

You explain what you want; Codex helps implement it. Astro provides the structure that makes the website work.

You will create a website locally today. Publishing comes in the next lesson.

Projectzia-portfolio
→
AstroWebsite structure
+
CodexYour assistant
→
PreviewRuns locally

You are the creative director. Codex is there to help you implement your ideas.

01

5 minutes

Understand What You’re Building

Before starting, understand three simple concepts. You do not need to memorize technical details.

⌁Your project folder

The place where your website’s files live on your computer.

Astro

The structure and tools used to create your website.

Local preview

A private version you can see in your browser before publishing online.

Your computerAstro website
→
localhostYour first website
×
Public internetNot yet
02

5–10 minutes

Prepare Your Project

Continue with the GitHub repository you created earlier in the course: zia-portfolio.

  1. 01

    Open GitHub Desktop

    Launch the app and select your zia-portfolio repository.

  2. 02

    Find the project folder

    Choose Repository → Show in Finder. A Finder window will open at the exact folder you need.

  3. 03

    Remember this location

    You will return to the same folder throughout the course.

GitHub Desktopzia-portfolio
→→
📁zia-portfolio
03

10–15 minutes

Check That Your Computer Is Ready

Open Codex, select the correct folder, then ask it to check only what is needed.

Open Codex
→
📁Open zia-portfolio
→
✓Check setup
Codex prompt · Readiness check
I’m a complete beginner. I want to create an Astro website in this folder. Check whether Node.js, npm and Astro’s requirements are available on my Mac. Don’t create the website yet. Tell me clearly what is ready and what is missing.
NODE.JSRuns development tools

Software that lets tools such as Astro work on your computer.

NPMInstalls packages

The tool that downloads what a project needs.

ASTROBuilds the website

The framework you will use for your portfolio.

If something is missing

Codex prompt · Fix only what is necessary
Help me install or fix only what’s missing. Explain each step simply and verify that it worked before continuing.

Confirm that you are ready

Codex prompt · Final check
Check again that my Mac is ready to create an Astro website. Tell me whether I can continue.
04

10–15 minutes

Create Your Astro Website

Once the checks pass, ask Codex to initialize Astro inside the open project folder.

Codex prompt · Create the website
Set up a new Astro website in this project folder. Keep the setup simple and suitable for a complete beginner. Don’t create a custom design or choose my website’s pages for me. Explain what you did when you’re finished.
zia-portfolio
  • src/Your website source
  • public/Static files
  • package.jsonProject information
  • astro.config.mjsAstro settings
Optional Codex prompt
Explain the main files and folders in my Astro project in very simple English.
05

5–10 minutes

Preview Your Website

Your website now exists on your computer. Start Astro’s local development server and open it in a browser.

Codex prompt · Start the preview
Start my Astro website locally and tell me how to open it in my browser.
localhost:4321
YOUR LOCAL WEBSITEWelcome to Astro.

This page is running privately on your computer.

LOCALOnly on your computer

Perfect for building, testing and experimenting.

→ Lesson 05 →
ONLINEAvailable to everyone

Publishing comes next.

06

15–25 minutes

Make Your First Creative Changes

Begin making the website your own. Choose one real idea—text, typography, photographs or layout—and describe it clearly.

AaTypography
Photographs
Layout
“ ”Text
Your prompt · Describe your idea
I want to start personalizing my portfolio. Help me make the following change: [DESCRIBE YOUR IDEA]. Keep the rest of the website unchanged.
01DescribeOne clear change
→
02PreviewLook in the browser
→
03AdjustExplain what feels wrong
↺
07

5–10 minutes

Save Your Progress

Use GitHub Desktop to create a clear save point and upload it to GitHub.

01Review changesUnderstand the files
→
02CommitSave a checkpoint
→
03Push originUpload to GitHub
  1. 01

    Open GitHub Desktop

    Select zia-portfolio and review the changed files.

  2. 02

    Ask about anything unexpected

    If a file surprises you, ask Codex to explain it before saving.

  3. 03

    Create the commit

    Use the summary Initial Astro website setup, then click Commit to main.

  4. 04

    Push your changes

    Click Push origin to upload the commit to GitHub.

Saved checkpointInitial Astro website setup

Your project is now stored in the repository and ready for the next lesson.

PUSHED

End of lesson 04

You created your first website.

You located your project, checked your Mac, set up Astro, opened a local preview, made creative changes with Codex, and saved the result with GitHub Desktop.

LocateCheckSet upPreviewCreateSave