311 Commits

Author SHA1 Message Date
Marcel Herrguth 1ba588c90e Closes #479 - Support Syntax highlighting for Salesforce Apex language (#725)
* Closes #479 - Support Syntax highlighting for Salesforce Apex language

* Linter
2026-06-19 04:27:34 +08:00
Thomas a2e4734e36 GitHub alerts in Markdown (#721)
Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
2026-06-19 00:07:06 +08:00
Thomas 66f2793f8b Add PKCE for OAuth providers (#720)
* PKCE

Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
2026-06-11 02:18:33 +08:00
Thomas daeeed3dc5 Fix CSS url for json embed url (#715)
Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
2026-06-10 02:14:42 +07:00
Thomas b43789943a Upgrade deps (#713)
Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
2026-06-09 04:57:30 +08:00
Marcel Herrguth bf3257faa8 Feature: Allow embedding Gists for a certain file only (#709)
* Feature: Allow embedding Gists for a certain file only

* Move from URL to param approach

* Switch gist.Files to gist.File

* Satisfy linting
2026-06-09 03:44:39 +08:00
Peter Barr 2946de2505 fix: apply topics push option in post-receive hook (#698)
* Apply `topics` push option in post-receive hook

The `topics` value was parsed into the push-options map but never read
by the hook, silently discarding any topics passed via `git push -o
topics=...`. Mirror the existing `title`/`description` handling and
reuse the `gisttopics` validator.

* Docs

Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>

---------

Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
Co-authored-by: Thomas Miceli <tho.miceli@gmail.com>
2026-06-08 04:20:50 +08:00
Thomas 34e5a16a26 Require login + api (#711)
Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
2026-06-08 03:28:49 +08:00
Thomas 31bc25e569 Beautiful docs website (#710)
Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
2026-06-08 03:15:24 +08:00
Thomas 3b8d947ad8 Fix SSH key generation (#708)
Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
2026-06-04 02:09:26 +08:00
Thomas 8e462397f4 API for gists and users (#707)
Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
2026-06-03 02:26:17 +08:00
KhaledMahfouz5 5c23d7feed Adding Arabic Translation (#706) 2026-06-03 02:21:29 +08:00
awkj 690f151592 feat: add REST API v1 with admin toggle and OpenAPI spec (#702)
Adds an HTTP REST API under /api/v1 with bearer-token auth, served
alongside the existing web UI. The API exposes seven endpoints:

  GET    /api/v1/user
  GET    /api/v1/gists
  POST   /api/v1/gists
  GET    /api/v1/gists/:uuid
  PATCH  /api/v1/gists/:uuid
  DELETE /api/v1/gists/:uuid
  GET    /api/v1/gists/:uuid/files/:filename/raw

Auth reuses the existing AccessToken model (extended with a new
ScopeUser permission for /user) and accepts both 'Authorization: Bearer
og_...' and the legacy 'Token og_...' header.

The API is gated by a new 'api-enabled' admin setting (default off) so
deployments must explicitly opt in from Admin Panel → Configuration.
When disabled, requests get a 503 with an actionable hint, and the
access-token settings page shows a banner pointing admins straight to
the toggle.

An embedded OpenAPI 3.1 spec is served at GET /api/v1/openapi.yaml;
import it into Postman / Insomnia / Bruno / openapi-generator for
interactive testing or client generation.

Other UX polish bundled in:
- Settings access-token form now exposes the new User scope and uses
  the existing locale.Tr lookups (translations backfilled for zh-CN).
- Language switcher distinguishes 简体中文 vs 繁體中文 instead of both
  appearing as '中文'.
- Settings page header tabs translated for zh-CN.
- POST /gists cleans up the on-disk repo when commit/create fails
  (previously orphaned).
- visibility=public list excludes private/unlisted gists (regression
  guard added).
- Content-Disposition filename in raw responses is RFC-escaped.

Docs: docs/usage/api.md walks through enabling the API, creating a
token, the seven endpoints with curl examples, error codes and v1
limitations.
2026-05-22 04:12:33 +08:00
Thomas Miceli 8da72b9545 Limit display if there is too much files in one gist (#701)
Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
2026-05-10 03:28:02 +08:00
John71 bfd75a9d58 fix(Gitea): Field avatar_url not found in Gitea JSON response by using gothic provided user data and removing our API call (#674)
Co-authored-by: John71 <john71@noreply.git.john71.fr>
2026-04-26 19:45:26 +08:00
Thomas Miceli d26221de54 Translated using Weblate (Ukrainian) (#659)
Currently translated at 69.4% (243 of 350 strings)

Translation: Opengist/Opengist
Translate-URL: http://tr.opengist.io/projects/_/opengist/uk/

Co-authored-by: Anonymous <noreply@weblate.org>
2026-03-13 11:17:23 +08:00
Thomas Miceli e91139d3ec Improve code search + tests (#663)
Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
Co-authored-by: Qiang Zhou <zhouqiang.loaded@bytedance.com>
Co-authored-by: theodoruszq <theodoruszq@gmail.com>
2026-03-13 11:16:10 +08:00
Webysther Sperandio 279da52899 feat: search all fields (#622)
*  feat(search): search all feature

- add Description field to Gist struct and index it
- extend SearchGistMetadata with Description and Content
- update Bleve and Meilisearch to index and search Description
- modify ParseSearchQueryStr to parse description: and content: keywords
- update templates and i18n for new search options

* Fix test

* Set content by default

Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>

* Config to define default searchable fields

Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>

---------

Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
Co-authored-by: Thomas Miceli <tho.miceli@gmail.com>
2026-03-12 00:55:23 +08:00
Thomas Miceli f8b3bbce6a Rebuild search index in admin options (#647)
Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
2026-03-09 07:30:28 +08:00
Thomas Miceli d796eeba98 Make gists username/urls case insensitive in URLS (#641)
Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
2026-03-03 15:28:49 +08:00
Thomas Miceli 6c22adba4e Fix async-loaded gist embed scripts (#630)
Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
2026-03-03 00:10:28 +08:00
Thomas Miceli bb63ecd048 Remove windows tests in CI for now (#629) 2026-03-02 16:59:43 +08:00
Thomas Miceli 6a61b720ab Improve test suite (#628)
Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
2026-03-02 15:43:24 +08:00
Thomas Miceli 829cd68879 CSRF skipper only for GET *.js request (#627)
Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
2026-03-02 15:05:45 +08:00
Thomas Miceli 42490f2995 fix uuid
Signed-off-by: Thomas Miceli <tho.miceli@gmail.com>
2026-02-26 06:42:00 +07:00
awkj f83018ebf2 support UTF-8, show no English Text (#625) 2026-02-26 02:13:09 +08:00
Thomas Miceli b097cfcbc0 Clean file path names on file creation (#624) 2026-02-25 23:30:26 +08:00
Thomas Miceli 7b1048ec30 Display a form to create an Opengist account coming from a OAuth provider (#623) 2026-02-08 16:32:24 +08:00
Thomas Miceli 3a4602d412 Translated using Weblate (Russian) (#605)
Currently translated at 100.0% (341 of 341 strings)

Translation: Opengist/Opengist
Translate-URL: http://tr.opengist.io/projects/_/opengist/ru/

Co-authored-by: FunNikita <mainik1111@icloud.com>
2026-02-03 16:56:04 +08:00
Thomas Miceli 2e10c1732a Add images and binary content on gist preview (#615) 2026-02-03 16:55:44 +08:00
Thomas Miceli fe04c03acb Improve security on raw files endpoint (#613) 2026-02-03 02:11:39 +08:00
Thomas Miceli 2a1554d063 Fix renderable text files with different mimetypes (#612) 2026-02-03 01:59:24 +08:00
Thomas Miceli b7dbdde66b Allow Access Tokens with Required Login (#611) 2026-02-02 19:31:07 +08:00
Thomas Miceli b48103c06a Translated using Weblate (Russian) (#604)
Currently translated at 58.9% (201 of 341 strings)

Translation: Opengist/Opengist
Translate-URL: http://tr.opengist.io/projects/_/opengist/ru/

Co-authored-by: FunNikita <mainik1111@icloud.com>
2026-01-27 23:27:11 +08:00
Thomas Miceli 5ddea2265d Add access tokens (#602) 2026-01-27 14:43:12 +08:00
Nova Cat 1128a81071 Ignore TCP errors (#601) 2026-01-27 13:49:37 +08:00
Thomas Miceli 145bf9d81a Move Prom metrics to a dedicated port + improve Helm chart (#599) 2026-01-26 17:28:51 +08:00
Thomas Miceli 4ff71fb255 Translations update from Opengist (#516)
* Translated using Weblate (German)

Currently translated at 98.1% (310 of 316 strings)

Translation: Opengist/Opengist
Translate-URL: http://tr.opengist.io/projects/_/opengist/de/

* Translated using Weblate (Italian)

Currently translated at 99.3% (318 of 320 strings)

Translation: Opengist/Opengist
Translate-URL: http://tr.opengist.io/projects/_/opengist/it/

---------

Co-authored-by: Marc <mbg14.gaming@gmail.com>
Co-authored-by: HardcodedNyxie <leonardotoschi07@gmail.com>
2026-01-25 22:16:40 +08:00
Thomas Miceli 67f7c4cadd Allow unicode letters/numbers in topics (#597) 2026-01-25 22:08:14 +08:00
Thomas Miceli 7b4dab143b Update Meili to 0.35.0 (#588) 2025-12-28 14:53:48 +08:00
Thomas Miceli 4d6809bc2d Feat/fix test (#577) 2025-12-27 21:29:52 +08:00
Thomas Miceli a493de4325 quick fix test (#576) 2025-12-27 20:50:15 +08:00
Thomas Miceli b11306851b Fuzzy search + tests (#555) 2025-12-26 22:36:28 +08:00
Thomas Miceli 3957dfb3ea Add some tests (#553) 2025-10-31 15:37:45 +07:00
Thomas Miceli f653179cbf Upgrade JS and Go deps versions (#517) 2025-10-07 16:59:37 +02:00
Thomas Miceli a468f0ecfa Translated using Weblate (Turkish) (#511)
Currently translated at 100.0% (308 of 308 strings)

Translation: Opengist/Opengist
Translate-URL: http://tr.opengist.io/projects/_/opengist/tr/

Co-authored-by: Sinan Eldem <sinan@sinaneldem.com.tr>
2025-09-29 19:02:45 +02:00
Thomas Miceli 5ef5518795 Fix CSV errors for rendering (#514) 2025-09-29 19:02:33 +02:00
Thomas Miceli 4106956f6d Fix human date on iOS devices (#510) 2025-09-21 04:31:58 +02:00
Fabio Manganiello c02bf97b63 feat: Add support for rendering .ipynb Jupyter/IPython notebooks (#491) 2025-09-21 03:48:59 +02:00
Thomas Miceli 53ce41e0e4 Add file upload on gist creation/edition (#507) 2025-09-16 01:56:38 +02:00