Git Studio now renders .html files directly — no more plain text source code in Preview mode.
Clicking an .html file on git.arikigame.com now shows the rendered webpage in a Preview tab. The HTML is served from S3 with stale-while-revalidate caching — first view uploads to S3, subsequent views are instant.
HTML is served from S3 (tinqs-git-preview bucket) — a completely different origin from git.arikigame.com. The iframe uses sandbox="allow-scripts" only — no allow-same-origin. Even if JavaScript runs, it cannot access Gitea session cookies, API tokens, or DOM.
| Rule | Details |
|---|---|
| Images | Upload to S3 and use absolute URLs: https://tinqs-screenshots.s3.eu-west-1.amazonaws.com/... |
| CSS / JS | Inline in the HTML file (single-file preferred) or use CDN URLs |
| Relative paths | Do NOT use — HTML is served from S3, not the repo |
| Frontmatter | Optional HTML comment block at top for title, date, author |
| Expand | Click the expand icon (top-right) to open full-screen in a new tab |
This image is served from tinqs-screenshots S3 bucket — proving S3 images render correctly inside the preview iframe:
| Component | Detail |
|---|---|
| S3 Bucket | tinqs-git-preview (eu-west-1) |
| IAM User | gitea-s3 (scoped policy) |
| Config | [html_preview] section in /etc/gitea/app.ini |
| Build | tinqs-git 3b81d57 (fork of Gitea v1.26.1) |
| Route | GET /:owner/:repo/preview/:ref/*path |