forgejo fork
  • Shell 84%
  • Go 16%
Find a file
2026-08-03 23:07:28 +03:00
build.sh Forgejo image build with sx chroma lexer 2026-08-03 23:07:28 +03:00
README.md Forgejo image build with sx chroma lexer 2026-08-03 23:07:28 +03:00
sx_lexer.go Forgejo image build with sx chroma lexer 2026-08-03 23:07:28 +03:00

forgejo + sx highlighting

Builds the upstream Forgejo docker image with the sx chroma lexer (sx/chroma, branch sx-lexer) registered, so .sx files and ```sx markdown fences highlight natively.

Build

./build.sh

Defaults: Forgejo v13.0.5, image git.swipelab.com/sx/forgejo:13.0.5-sx. The upstream source is cloned at the pinned tag and built with Forgejo's own Dockerfile; the only change is two files dropped into modules/highlight/: sx.xml (fetched from sx/chroma) and sx_lexer.go (registers it).

  • New Forgejo release: FORGEJO_VERSION=v13.0.6 ./build.sh
  • Lexer changed: push to sx/chroma sx-lexer branch, re-run ./build.sh
  • Rootless image: DOCKERFILE=Dockerfile.rootless ./build.sh
  • Cross-build: PLATFORM=linux/amd64 ./build.sh

Publish

docker push git.swipelab.com/sx/forgejo:13.0.5-sx