Main hub for all ALGORYTHM session slide decks + student bio pages.
- Live site: https://algorythm-iit-bhilai.vercel.app - serves
index.htmlfrommain(auto-redeploys on every merge). The page readsstudents.json+sessions.jsonand renders the lists - no build step. - Slide decks: HTML files under
sessions/<session-id>/. Linked fromindex.htmlviasessions.json. Since they are plain HTML, they open directly in the browser. - Student pages: each student owns
students/<NAME>-<ID>-<GithubUsername>/index.html+ one line instudents.json.index.htmlat root reads that JSON and creates the directory of webpages.
Students get featured by opening a Pull Request. PRs that follow the exact format below are auto-merged by GitHub Actions.
⚠️ You MUST create your own branch first. PRs raised directly frommainare auto-rejected.⚠️ You may ONLY edit the folder carrying YOUR OWN GitHub username. Touching anyone else's folder = auto-rejected. ⛔ NEVER edit.github/workflows or scripts,index.html,sessions/, or README.md. Student PRs must touch ONLY your own folder (students/<NAME>-<ID>-<GithubUsername>/**) and optionallystudents.json. If you touch any other file, the bot will automatically reject your PR.⚠️ Do NOT usegit add .orgit add -A. Always stage specifically:git add students/<NAME>-<ID>-<YourGithubUsername> students.json.⚠️ If your PR shows a merge conflict, it will NOT be merged. Resolve it locally first, then push. Forgot thestudents.jsonline? Open the PR anyway - the bot adds the missing line to your branch itself (keep "Allow edits from maintainers" ticked, it is on by default) and re-checks.
# Fork this repo on GitHub (click Fork), then:
git clone https://github.com/<YOUR-USERNAME>/algorythm-iit-bhilai.git
cd algorythm-iit-bhilai
git remote add upstream https://github.com/<OWNER>/algorythm-iit-bhilai.git
git fetch upstream
git checkout main
git reset --hard upstream/maingit checkout main
git pull upstream main # or: git fetch upstream && git reset --hard upstream/main
git checkout -b add-<NAME>-<ID>-<YourGithubUsername>
# Example: git checkout -b add-Swarnadip-12342210-Swarnadip-KarRules:
- Branch name must be
add-<NAME>-<ID>-<YourGithubUsername>(same suffix as your folder). Keep your original case. - The username part MUST be YOUR OWN GitHub username (case-insensitive match with the PR author). You cannot open a PR for someone else's folder.
- Never commit directly to
main. Never open a PR whose head branch ismain/master- the bot rejects it. - One student = one branch = one PR.
Run this from the repo root - it creates your folder from the template AND appends the exact JSON line:
python3 students/add-me.py --name YourName --id YourID --github YourGithubUsername
# Example: python3 students/add-me.py --name Swarnadip --id 12342210 --github Swarnadip-KarRules:
- Folder is created as
<NAME>-<ID>-<GithubUsername>- keep your original case (no forced lowercase). - NAME = your real name: letters/numbers/
_, start with letter, NO hyphens. ID = your roll no. / chosen ID: letters/numbers, NO hyphens. Last part = YOUR GitHub username (may contain hyphens). - Example:
Swarnadip-12342210-Swarnadip-Kar→ NAME=Swarnadip, ID=12342210, GithubUsername=Swarnadip-Kar. Keep ID stable forever. - Inside your folder:
index.htmlis required (put your real name in<h1>/<title>). You may addstyle.cssand images (total < 500 KB). Do NOT touch anyone else's folder - the bot checks the username part against YOUR login.
Prefer manual? cp -r students/_template students/<NAME>-<ID>-<YourGithubUsername> and hand-edit students.json - the entry must look exactly like this:
[
{
"name": "Swarnadip",
"id": "12342210",
"folder": "Swarnadip-12342210-Swarnadip-Kar",
"page": "students/Swarnadip-12342210-Swarnadip-Kar/index.html",
"github": "Swarnadip-Kar"
}
]Rules for the hand-written line:
folderMUST equal<name>-<id>-<github>exactly (case-sensitive).pageMUST equalstudents/<folder>/index.html.githubMUST equal YOUR GitHub username (matches the PR author, case-insensitive).id+folder+githubmust be unique - no duplicates (same first name is fine; one folder per GitHub account).- Only ONE new entry per PR. Do not reformat the whole file.
Forgot the students.json line entirely? Open the PR anyway - the bot adds the missing line to your branch itself (keep "Allow edits from maintainers" ticked, it is on by default) and re-checks.
Edit students/<NAME>-<ID>-<GithubUsername>/index.html - make it beautiful. See students/_template/index.html and students/Swarnadip-12342210-Swarnadip-Kar/index.html. Your page is listed on the main hub (index.html) automatically from students.json.
⚠️ Important: Do NOT rungit add .orgit add -A. That will accidentally stage unrelated files (like rootindex.html, workflow files, or.DS_Store), which will fail CI validation. Explicitly add only your files:
git add students/<NAME>-<ID>-<YourGithubUsername> students.json
git status # MUST show ONLY your folder + students.json (no .github/, no index.html)
git commit -m "add: <NAME>-<ID>-<YourGithubUsername> bio page"
git push -u origin add-<NAME>-<ID>-<YourGithubUsername>Then on GitHub: Compare & pull request → base: upstream/main ← compare: <YOUR-USERNAME>:add-<NAME>-<ID>-<YourGithubUsername>.
PR title format (required for auto-merge):
add: <NAME>-<ID>-<GithubUsername>
# Example: add: Swarnadip-12342210-Swarnadip-Kar
PR body: write 1 line - your name + what your page has.
If your students.json line is missing, the bot adds it to your branch first (same format) and re-checks - so the most common mistake fixes itself.
The validate-and-automerge Action approves + squash-merges ONLY if ALL pass:
- Head branch is NOT
main/master- must beadd-<NAME>-<ID>-<GithubUsername>, and its username part MUST equal YOUR login (the PR author). - Base branch is
main. - No merge conflicts (
mergeable= clean). Conflicting PRs are rejected - see §2. - Changed files = ONLY YOUR OWN
students/<NAME>-<ID>-<GithubUsername>/**+students.json(nothing else - never.github/workflows/scripts, never_template/, neverindex.html, never someone else's folder). students.jsondiff = exactly +1 entry, valid JSON,folder == name-id-github,page == students/<folder>/index.html,github== YOUR username, no duplicate id/folder/github-user.students/<NAME>-<ID>-<GithubUsername>/index.htmlexists, contains<html>+<h1>/<title>with your real name, < 500 KB, no secrets.- For edits (updating your own bio later):
students.jsonmay stay untouched, but then you may ONLY touch files inside YOUR OWN already-listed folder. Same branch rule applies (update-<NAME>-<ID>-<GithubUsername>).
If any check fails, the bot posts a comment explaining what to fix. Fix on the SAME branch + push - the PR re-checks automatically. No need to open a new PR.
If your PR page shows “This branch has conflicts that must be resolved”, the bot will reject it and never merge it until YOU fix it. This almost always means someone else edited students.json before you (same lines).
Do NOT click “Resolve conflicts” on github.com for students.json unless you know JSON well - one stray comma breaks the whole site. Fix locally:
# on YOUR branch
git fetch upstream
git rebase upstream/main
# OR: git merge upstream/main
# Git will mark CONFLICT in students.json. Open it, keep BOTH entries (yours + theirs), remove <<<<<<< ======= >>>>>>> markers, ensure valid JSON.
# verify JSON is still valid:
python3 -c "import json; json.load(open('students.json')); print('JSON OK')"
# verify your entry + folder still correct:
python3 .github/scripts/validate.py --base upstream/main --head HEAD || true
git add students.json
git rebase --continue # if you used rebase (or: git commit, if you used merge)
git push --force-with-lease # after rebase; plain `git push` after mergeThen confirm on your PR page: “This branch has no conflicts” + green checks. The bot will auto-merge from there.
First-timer tip: always
git pull upstream main/rebaseright before you start Step 1 - most conflicts disappear if you start from freshmain.
Add a session:
- Copy deck HTML into
sessions/<new-session-id>/index.html(+ extras). - Add one object to
sessions.json(id/title/date/description/deck/files). - Push to
main-index.htmlpicks it up automatically. No rebuild.
Hosting: primary live site is the Vercel project linked to this repo (auto-deploys main). GitHub Pages is also ON as a backup deploy of the same main - but share only the vercel.app link, since the shared *.github.io host shows a browser warning (flagged because of an unrelated demo project).
Branch protection (active): main requires the validate check + PR before merging (strict off so queued auto-merges complete). Admins can still push session decks directly. Auto-merge bot has contents:write + pull-requests:write and squash-merges compliant PRs.
Management notes (private, NOT in git): see ../management/ next to this repo - owner checklist, links, roll list. Never commit that folder.
algorythm-iit-bhilai/
index.html ← main hub (reads JSON, renders sessions + students)
students.json ← THE main file students append one line to
sessions.json ← slide-deck catalogue
students/
_template/index.html
Swarnadip-12342210-Swarnadip-Kar/index.html ← example
<NAME>-<ID>-<GithubUsername>/index.html ← yours (username MUST be yours)
sessions/
session-01-intro-explore/index.html (+ pdf/md/png)
session-02-git-agents/index.html (+ …)
session-02-1-git-recovery/index.html (+ …)
.github/
workflows/validate-and-automerge.yml
workflows/pages.yml (backup host deploy)
scripts/validate.py