What you will build
A set of HTML pages in one folder, with an index.html landing
page that links to the others. Each page is fully self-contained: inline CSS, a system
font stack, and no CDN links, web fonts, or other external dependencies. The folder
becomes a GitHub repository, and GitHub Pages serves it as a live website.
What you need
- A free GitHub account.
- git installed on your computer.
- The GitHub CLI (
gh), signed in withgh auth login. Optional, but it turns creating and pushing the repo into a single command. - A text editor, or Claude Code if you want to generate the whole site from the one-shot prompt below.
Step by step
- Create your pages. Write each page as a single
.htmlfile with its CSS inline and a system font stack. Keepindex.htmlas the landing page and link to the others with relative links, for examplehref="about.html". - Put every file in one folder. That folder is your repository.
- Start git and make a first commit:
git init -b main git add . git commit -m "Initial commit" - Create the repository and push it with the GitHub CLI (replace
the placeholders with your username and a repo name):
gh repo create USERNAME/REPO_NAME --public --source=. --remote=origin --push - Turn on GitHub Pages. In the repository on GitHub, open Settings โ Pages. Under "Build and deployment", set Source to "Deploy from a branch", choose the main branch and the / (root) folder, then click Save.
- Visit your site. After about a minute it goes live at
https://USERNAME.github.io/REPO_NAME/.
The one-shot prompt
If you use Claude, you can hand it the whole job in a single prompt. Copy the text below, fill in the bracketed parts, and run it in Claude Code from an empty folder:
Copy this prompt
Set up a multi-page static site for GitHub Pages in the current directory.
Pages:
- index.html: a landing page that links to every sub-page below with relative links
- about.html: a short page describing the site
- (add any other pages you want, for example guide.html or projects.html)
Constraints:
- Every page must be fully self-contained: no CDN links, no Google Fonts, and no
external runtime dependencies. Use inline CSS only and a system font stack.
- Clean, readable, semantic HTML.
Then:
- Initialise git in the directory, make a first commit, and push to a new public
GitHub repository named [REPO_NAME] under my account, on the main branch. Use the
GitHub CLI (gh) to create the repo and push.
- Confirm that any secrets file such as .env is listed in .gitignore.
- Give me the exact steps to enable GitHub Pages
(Settings > Pages > Deploy from a branch > main > /root)
and the final URL: https://[USERNAME].github.io/[REPO_NAME]/
New to Claude Code?
This whole collection was built with Claude Code, Anthropic's command-line coding tool. If you are just getting started, this guide covers installation and first steps: