Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/apursley2012/treasure-hunt-game/llms.txt

Use this file to discover all available pages before exploring further.

Treasure Hunt is a fully static HTML, CSS, and JavaScript application with no build step, no npm dependencies, and no server-side code. That makes GitHub Pages an ideal host — push the files, enable Pages in repository settings, and the game is live at a public URL within a couple of minutes.

Prerequisites

  • A GitHub account with permission to create repositories.
  • The project files — either cloned locally or forked directly on GitHub. The repository must include index.html at the root, the assets/ folder, and a .nojekyll file.

Deployment Steps

1

Create the repository and push index.html to the root

Create a new repository on GitHub (or fork the existing one). Push the project so that index.html sits at the repository root — not inside a subfolder.The required files at the root are:
/
├── index.html
├── .nojekyll
└── assets/
    ├── css/styles.css
    ├── js/app.js
    ├── js/q-agent.js
    ├── js/treasure-maze.js
    └── images/treasure-hunt-logo.png
2

Confirm .nojekyll is present at the repository root

GitHub Pages runs a Jekyll processing step by default. Jekyll ignores files and folders whose names begin with an underscore or a dot, which can silently swallow JavaScript module imports that use relative paths. A .nojekyll file at the root tells GitHub Pages to skip Jekyll entirely and serve your files as plain static assets.Create the file if it is missing:
touch .nojekyll
git add .nojekyll
git commit -m "Add .nojekyll to disable Jekyll processing"
git push
3

Open Settings → Pages in your GitHub repository

In the repository on GitHub, click the Settings tab, then click Pages in the left sidebar under the Code and automation section.
4

Set the source branch and folder, then save

Under Build and deployment, set:
  • SourceDeploy from a branch
  • Branchmain (or whichever branch holds your files)
  • Folder/ (root)
Click Save. GitHub will start the deployment. Refresh the page after 30–60 seconds and a banner will appear with your live URL.

Expected Result

After the deployment finishes — usually within 1–2 minutes for the first push — GitHub Pages provides a public URL in the format:
https://<username>.github.io/<repo-name>/
Open that URL in any modern browser. The game loads with a fresh randomized maze, both player and agent at [0, 0], and the HUD showing Ready. No login, no API key, and no server is required.

The .nojekyll File Explained

Jekyll, GitHub’s default static site processor, excludes files and folders that start with _ or . from the build output. This is not normally a problem for plain HTML pages, but Treasure Hunt’s JavaScript module imports use relative paths like ./assets/js/treasure-maze.js. If Jekyll processes the repository, those assets may be omitted or their paths mangled, leaving app.js unable to resolve its imports and producing a blank board. The .nojekyll file is an empty marker that bypasses Jekyll completely, so GitHub Pages serves every file in the repository exactly as it exists in the branch.

Optional: Custom Domain

If you want the game to be available at a domain you own (for example, treasure-hunt.yourdomain.com):
  1. Go to Settings → Pages in your repository.
  2. Under Custom domain, enter your domain and click Save.
  3. Add a CNAME DNS record at your domain registrar pointing to <username>.github.io.
  4. GitHub Pages will provision an HTTPS certificate automatically within a few minutes.
All asset paths in index.html and styles.css must be relative — for example, ./assets/css/styles.css and ./assets/js/app.js. Absolute paths like /assets/css/styles.css work when the project is served from the root of a domain, but break when GitHub Pages hosts the site under a subdirectory such as https://<username>.github.io/<repo-name>/. The source files already use relative paths — do not change them to absolute when editing the project.
Treasure Hunt requires no CI/CD pipeline, no build command, and no npm install. There is nothing to compile, transpile, or bundle. Pushing the source files and enabling GitHub Pages is the entire deployment process. The game is live the moment the Pages deployment completes.

Build docs developers (and LLMs) love