A static page (plain HTML/CSS/JS, no build step) that lists your projects by section.
All content lives in projects.js. Opening index.html by double-click works.
index.html,style.css,script.js: the public pageprojects.js: all content (sections and projects)admin.html,admin.js: editing page, opened from the ⚙ Admin button at the top right of the site (it needs your token to do anything)
- Your repo is
Home. If it already exists, back up what is in it; the newindex.htmlandstyle.cssreplace any with the same name. - On github.com open the repo, Add file → Upload files, drag in all files from this zip, then Commit changes (branch
main). - Settings → Pages: Source = Deploy from a branch, branch
main, folder/ (root). Save. - After about a minute the site is at
https://victorreyesgit.github.io/Home/. The admin page is athttps://victorreyesgit.github.io/Home/admin.html(also reachable from the ⚙ Admin button on the site).
Cloudflare Pages also works (connect the repo, no build command, output directory /). The admin settings in admin.js still point to the GitHub repo.
- GitHub → your profile picture → Settings.
- Bottom of the left menu: Developer settings → Personal access tokens → Fine-grained tokens.
- Generate new token. Name:
projects-hub-admin. - Expiration: pick a short one (30 or 90 days). Avoid "no expiration".
- Resource owner:
victorreyesgit. - Repository access → Only select repositories → choose
Home. - Permissions → Repository permissions → Contents: Read and write. Leave everything else as "No access" (Metadata read-only is added automatically).
- Generate token and copy it (starts with
github_pat_). GitHub shows it only once.
- Open
admin.html, paste the token, click Save token and load. - The page looks like the public site. Click any text (site name, section names, project names, descriptions, tags, URLs) and type to edit it in place.
- Reorder: drag the ⠿ handle of a section or project and drop it where the purple line appears. Projects can be dragged into other sections (including empty ones). On touch screens, where dragging does not work, use the ↑ ↓ buttons.
- Hide / Show keeps an item but removes it from the public site; Delete removes it; the dropdown on each project also moves it to another section.
- Click Save to GitHub. A green message confirms the commit; the site updates in about a minute.
- If you see "changed on GitHub since you loaded it", someone (you, by hand) edited the file meanwhile: click Reload from GitHub and redo the edit. Nothing is overwritten.
- Forget token removes it from that device. Do this on shared computers.
OWNER, REPO, BRANCH and FILE are constants at the top of admin.js.
Open projects.js on github.com, click the pencil, edit, Commit changes. The comment at the top has a copy-paste example. Rules: valid JSON inside the braces (double quotes, no trailing commas, no comments inside) and keep the line window.PROJECTS = {. The admin page needs this to read the file; if it is broken, the admin tells you.
Sections with no visible projects are hidden. Set "visible": false on a section or project to hide it without deleting it.
- The token sits in
localStorageunencrypted. Anyone with access to your unlocked browser profile, or any script running on the same origin, can read it. - Same-origin risk: on a GitHub user site, all your project pages (
victorreyesgit.github.io/Manifold-Balls/etc.) share one origin withadmin.html. Any of them, including third-party scripts they load, could read the stored token. If you worry about that, host the hub on its own origin (e.g. Cloudflare Pages*.pages.devor a separate domain), or use a private/incognito window and Forget token afterwards. - What a leaked token can do: write files in this one repo. That means defacing the site or adding malicious JavaScript to it. It cannot touch your other repos or account settings. A short expiry limits the time window.
- Mitigations already in place: one repo only, Contents permission only,
admin.htmlhas a Content-Security-Policy limiting network calls toapi.github.com, and the token is never in the repo. - If a token may have leaked: delete it in GitHub Developer settings; it stops working immediately.