Link a GitHub repo to the Hartzog.ai ecosystem. Adds it to sites.json, creates the .hartzog.json flag file, and sets up the shared theme in the child repo.
You are linking a GitHub repository to the Hartzog.ai project ecosystem.
The user provides: $ARGUMENTS
Parse the arguments:
my-rust-project). Required."My Rust Project"). Optional — infer from repo name if not given (title-case, replace hyphens with spaces).Check if the repo exists under the timothyhartzog GitHub account:
gh repo view timothyhartzog/$0 --json name,description,homepageUrl 2>/dev/null
If the repo doesn't exist, inform the user and ask if they want to proceed anyway (they may create it later).
Read the current src/theme/sites.json in this repository (timothyhartzog.github.io).
Add a new entry to the sites array:
{
"name": "<display-name>",
"url": "https://timothyhartzog.github.io/<repo-name>",
"repo": "<repo-name>",
"description": "<description>",
"icon": "code"
}
Important:
"primary": true — only the main site has thatCreate the file at a temporary location so the user can copy it, OR if the child repo is cloned locally (check common paths like ~/<repo-name> or sibling directories), write it directly.
The flag file contents:
{
"parent": "https://www.hartzog.dev",
"theme": true,
"name": "<display-name>",
"description": "<description>"
}
If you have access to the child repo locally, create an index.html using the template from templates/child-repo/index.html in this repo. Update:
<title> tag with the project name<h1> with the project nameDisplay what was done:
Linked: <repo-name> → Hartzog.ai ecosystem
sites.json: Added "<display-name>" (https://timothyhartzog.github.io/<repo-name>)
Flag file: .hartzog.json created
Theme: Shared nav/footer/colors via CDN
Next steps:
1. Copy .hartzog.json to the root of <repo-name> (if not done automatically)
2. Commit and push changes in both repos
3. The project will appear on hartzog.dev/projects and in the nav dropdown
Ask the user if they want to commit the sites.json change in this repo.