master
  1# Gitmal configuration example
  2# ============================
  3# Usage: gitmal --config path/to/this/file.toml [options]
  4#
  5# Three modes are supported:
  6#   1. Multi-repo mode  — populate the [[repos]] array
  7#   2. Single-repo config mode — use a [repo] section
  8#   3. Legacy single-repo mode — pass a path as positional argument (no --config)
  9#
 10# [repo] and [[repos]] are mutually exclusive.
 11
 12
 13
 14# -------- Global (optional) --------
 15
 16# Site name. Displayed in:
 17#   - the multi-repo index page title and menu
 18#   - each repo page header as part of the breadcrumb
 19# Defaults to "Git repositories" when omitted.
 20site_name = "Gitmal"
 21
 22# =============================================================================
 23# Multi-repo mode — [[repos]]
 24# =============================================================================
 25# Populate the [[repos]] array with two or more entries.
 26# Each repo is generated into output/<slug>/.
 27# The root output/index.html becomes a repo listing page.
 28#
 29# When [[repos]] is present, positional CLI arguments are ignored.
 30
 31[[repos]]
 32
 33  name = "Gitmal"
 34
 35  slug = "gitmal"
 36
 37  path = "/srv/repos/gitmal"
 38
 39  description = "Static Git page generator"
 40
 41  # This repo uses "master" instead of "main".
 42  default_branch = "master"
 43
 44
 45
 46# =============================================================================
 47# Single-repo config mode — [repo]
 48# =============================================================================
 49# Use the [repo] section to configure a single repo with metadata from the
 50# config file (site_name, etc.).
 51#
 52# [repo] and [[repos]] are mutually exclusive.
 53#
 54# Path priority: CLI positional arg > [repo].path
 55# When a positional argument is provided, it takes precedence over the file path.
 56
 57# [repo]
 58#
 59#   name = "My Project"
 60#   path = "/srv/repos/my-project"
 61#
 62#   # No slug needed in single-repo mode; output goes directly into output/.
 63#
 64#   description = "My personal project"
 65#   default_branch = "main"
 66
 67
 68
 69# Multi-repo sort order. Options:
 70#   "config"    — as written in the config file (default)
 71#   "name-asc"  — alphabetically by name A–Z
 72#   "name-desc" — alphabetically by name Z–A
 73#   "time-asc"  — by last commit time, oldest first
 74#   "time-desc" — by last commit time, newest first
 75# Has no effect in single-repo mode.
 76# sort = "name-asc"
 77
 78# -------- Global settings (optional, overrideable by CLI flags) --------
 79# These options can also be passed on the command line (higher priority).
 80# When omitted, the CLI flag default (or program default) is used.
 81
 82# Code highlighting theme name (default "github").
 83# theme = "github"
 84#
 85# Explicit light/dark theme overrides (takes precedence over --theme).
 86# theme_light = "github"
 87# theme_dark = "github-dark"
 88#
 89# Regex filter for branches to include (default: empty = all branches).
 90# branches = "feature-.*"
 91#
 92# Output directory for generated HTML files (default "output").
 93# output = "_site"
 94#
 95# Minify all generated HTML files.
 96# minify = true
 97#
 98# Generate .gz files in addition to HTML.
 99# gzip = true
100#
101# Generate static files for Git dumb HTTP protocol.
102# git = true
103#
104# Embed all CSS inline in HTML instead of external files.
105# inline_styles = true
106
107# =============================================================================
108# Corresponding CLI flags (higher priority than config)
109# =============================================================================
110#   --branches=regex      Branch filter regex
111#   --default-branch      Default branch name (overrides config)
112#   --theme               Code highlighting theme (default "github")
113#   --theme-light         Light theme override
114#   --theme-dark          Dark theme override
115#   --minify              Minify generated HTML
116#   --gzip                Generate .gz files in addition
117#   --git                 Generate Git dumb HTTP protocol files
118#   --inline-styles       Embed CSS in HTML instead of external files
119#   --output              Output directory (default "output")
120#   --sort=str            Multi-repo sort order: config, name[-asc|-desc], time[-asc|-desc]