Efe Tarhan

Blog admin — one-time setup

A web CMS for the blog at https://tarhanefe.github.io/admin/. Sveltia uses a personal access token to call GitHub on your behalf — no OAuth App, no proxy, no server. The token lives in your browser’s localStorage; clearing site data signs you out.

You only do this setup once per device.

1 · Generate a fine-grained PAT

Open https://github.com/settings/personal-access-tokens/new.

Field Value
Token name tarhanefe.github.io CMS
Expiration 90 days (or longer; you can rotate)
Resource owner tarhanefe
Repository access Only select repositories → pick tarhanefe.github.io
Repository permissions Contents: Read and write, Metadata: Read-only

Click Generate token, then copy the token (it starts with github_pat_…). GitHub only shows it once.

2 · Sign in

Open https://tarhanefe.github.io/admin/. Click Sign In with Token. Paste the PAT. You’re in.

(On phone: add the page to your home screen — it behaves like an app.)

3 · Write

Inside an entry: type into the markdown editor; drag-and-drop images to upload (they land in images/blog/); flip the live preview to see formatting; click Save to commit + push. The site rebuilds in ~1 min.

To promote a draft to a published post: open the draft, copy its body, create a new entry in the Posts collection, paste, fill in the date, save, then delete the draft. (Sveltia doesn’t have a one-click move between collections yet.)

Notes

If you ever want to disable the CMS

Delete the admin/ folder. The CMS only exists where the files live; nothing else on the site touches it.