1
0
Fork 0
mirror of https://codeberg.org/HPCesia/gitmal.git synced 2026-09-11 10:22:18 +08:00
No description
  • Go 77.5%
  • Go Template 11.5%
  • CSS 10.6%
  • Nix 0.3%
Find a file
2026-07-05 00:53:59 +08:00
.github fixing ordering: build before testing (#20) 2025-12-25 23:17:33 +01:00
docs Add repos sort config 2026-07-05 00:53:54 +08:00
img Add gitmal black and white logo 2025-12-01 22:12:58 +01:00
pkg Fix code block background color in Markdown 2026-07-05 00:53:59 +08:00
.envrc Add Nix related entries 2026-07-02 12:33:42 +08:00
.gitignore Add Nix related entries 2026-07-02 12:33:42 +08:00
blob.go Fix auto theme missing in markdown and blob 2026-07-03 01:25:10 +08:00
branches.go Wire up multi-repo orchestration in main 2026-07-02 12:34:14 +08:00
commit.go Wire up multi-repo orchestration in main 2026-07-02 12:34:14 +08:00
commits_list.go Wire up multi-repo orchestration in main 2026-07-02 12:34:14 +08:00
config.go Add repos sort config 2026-07-05 00:53:54 +08:00
Dockerfile Add git to the docker image for full functionality (#21) 2025-12-29 15:12:37 +01:00
dumb.go Add dumb HTTP protocol support for hosting git repos on static servers 2026-07-02 12:33:51 +08:00
flake.lock Add Nix related entries 2026-07-02 12:33:42 +08:00
flake.nix Add Nix related entries 2026-07-02 12:33:42 +08:00
go.mod Add TOML config types, parsing, and --config flag 2026-07-02 12:34:11 +08:00
go.sum Add TOML config types, parsing, and --config flag 2026-07-02 12:34:11 +08:00
index.go Wire up multi-repo orchestration in main 2026-07-02 12:34:14 +08:00
index_multi.go Add multi-repo index page template and generation 2026-07-02 12:34:14 +08:00
LICENSE First commit 2025-11-30 12:46:34 +01:00
list.go Fix auto theme missing in markdown and blob 2026-07-03 01:25:10 +08:00
main.go Add repos sort config 2026-07-05 00:53:54 +08:00
markdown.go Add adaptive light/dark theme support 2026-07-02 12:33:52 +08:00
package.nix Fix Nix vendor hash 2026-07-03 01:25:10 +08:00
post_process.go Extract common inline styles into separate CSS files 2026-07-02 12:33:52 +08:00
readme.go Refactor code by introducing Ref type 2025-12-07 16:56:52 +01:00
README.md Fix validateRepoPath to support bare git repos 2026-07-03 01:25:09 +08:00
RELEASE.md Add RELEASE.md with steps for creating releases and building binaries 2025-12-07 20:56:27 +01:00
styles_gen.go Let chroma theme control blob code block background 2026-07-04 23:36:52 +08:00
tags.go Wire up multi-repo orchestration in main 2026-07-02 12:34:14 +08:00
themes.go Add adaptive light/dark theme support 2026-07-02 12:33:52 +08:00
utils.go Use DirName for branch conflict detection in hasConflictingBranchNames. Improve error message for conflicting branch directory names in main.go. 2025-12-07 20:23:46 +01:00

Gitmal

Gitmal

This repository is a fork of upstream.

Warning

** All commits after the fork are generated by LLM Coding Agent and have not been reviewed by humans. Use at your own risk.**

Gitmal is a static page generator for Git repositories. Gitmal generates static HTML pages with files, commits, code highlighting, and markdown rendering.

Installation

go install github.com/antonmedv/gitmal@latest
docker run --rm -v $(pwd):/repo antonmedv/gitmal /repo

Or download prebuilt binary from releases.

Usage

Run gitmal in the repository dir. Gitmal will generate pages in ./output directory.

gitmal .

Run gitmal with --help flag to get a list of available options.

gitmal --help

Generate static files for Git dumb HTTP protocol (enables git clone via HTTP):

gitmal --git .

Generate multiple repositories with a TOML config file:

gitmal --config repos.toml

Example repos.toml:

site_name = "My Git Host"

[[repos]]
name = "nix-config"
slug = "nix-config"
path = "/home/user/nix-config"
default_branch = "main"

[[repos]]
name = "dotfiles"
slug = "dotfiles"
path = "/home/user/dotfiles"
default_branch = "master"

Filter branches with a regular expression:

gitmal --branches '^(main|master)$' .

Screenshots

Gitmal Code Highlighting Gitmal File Tree
Gitmal Files Page

Examples

Here are a few examples of repos hosted on my website:

Gitmal on kubernetes repository works as well. Generation on my MacBook Air M2 with --minify and --gzip flags takes around 25 minutes, and the generated files weigh around 2 GB.

Themes

Gitmal supports different code highlighting themes. You can customize the theme with --theme flag.

gitmal --theme github-dark

Documentation

License

MIT