<p align="center"><img src="img/gitmal-color-logo.webp" alt="Gitmal" width="330" height="330"></p>

# Gitmal

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

## This is a fork

The upstream is <https://github.com/antonmedv/gitmal>.

This version:
 - clone: `git clone https://www.intermittent.network/git/gitmal.git`
 - browse the [repository as rendered by the fork](https://www.intermittent.network/git/gitmal/)

## Installation

From a checkout:

```sh
go install .
```

## Usage

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

```sh
gitmal .
```

Run gitmal with `--help` flag, go get a list of available options.

```sh
gitmal --help
```

## Screenshots

<p align="center">
  <a href="img/gitmal-screenshot-code-highlighting.webp"><img src="img/gitmal-screenshot-code-highlighting.webp" alt="Gitmal Code Highlighting" width="400"></a>
  <a href="img/gitmal-screenshot-file-tree.webp"><img src="img/gitmal-screenshot-file-tree.webp" alt="Gitmal File Tree" width="400"></a><br>
  <a href="img/gitmal-screenshot-files.webp"><img src="img/gitmal-screenshot-files.webp" alt="Gitmal Files Page" width="400"></a>
</p>

## Themes

Gitmal supports different code highlighting themes. Both a light and dark theme are required, and switching is based on the browser settings.

The default is:
```sh
gitmal --light-theme github --dark-theme github-dark
```

## Documentation

From upstream, not updated:
- [How to Self-Host a Git Repository?](./docs/how-to-self-host-a-git-repository.md)

## License

[MIT](LICENSE)
