Commit 18a97f2

HPCesia <me@hpcesia.com>
2026-07-01 19:24:31
Add comprehensive config example file with annotations
1 parent f479fb5
Changed files (1)
docs/config.example.toml
@@ -0,0 +1,87 @@
+# Gitmal configuration example
+# ============================
+# Usage: gitmal --config path/to/this/file.toml [options]
+#
+# Three modes are supported:
+#   1. Multi-repo mode  — populate the [[repos]] array
+#   2. Single-repo config mode — use a [repo] section
+#   3. Legacy single-repo mode — pass a path as positional argument (no --config)
+#
+# [repo] and [[repos]] are mutually exclusive.
+
+
+
+# -------- Global (optional) --------
+
+# Site name. Displayed in:
+#   - the multi-repo index page title and menu
+#   - each repo page header as part of the breadcrumb
+# Defaults to "Git repositories" when omitted.
+site_name = "Gitmal"
+
+# Optional owner name shown in some page titles.
+# owner = "My Organization"
+
+
+# =============================================================================
+# Multi-repo mode — [[repos]]
+# =============================================================================
+# Populate the [[repos]] array with two or more entries.
+# Each repo is generated into output/<slug>/.
+# The root output/index.html becomes a repo listing page.
+#
+# When [[repos]] is present, positional CLI arguments are ignored.
+
+[[repos]]
+
+  name = "Gitmal"
+
+  slug = "gitmal"
+
+  path = "/srv/repos/gitmal"
+
+  description = "Static Git page generator"
+
+  # This repo uses "master" instead of "main".
+  default_branch = "master"
+
+
+
+# =============================================================================
+# Single-repo config mode — [repo]
+# =============================================================================
+# Use the [repo] section to configure a single repo with metadata from the
+# config file (site_name, etc.).
+#
+# [repo] and [[repos]] are mutually exclusive.
+#
+# Path priority: CLI positional arg > [repo].path
+# When a positional argument is provided, it takes precedence over the file path.
+
+# [repo]
+#
+#   name = "My Project"
+#   path = "/srv/repos/my-project"
+#
+#   # No slug needed in single-repo mode; output goes directly into output/.
+#
+#   description = "My personal project"
+#   default_branch = "main"
+
+
+
+# =============================================================================
+# Corresponding CLI flags
+# =============================================================================
+# Most flags can also be passed on the command line (higher priority):
+#
+#   --branches=regex      Branch filter regex (default: empty = all branches)
+#   --default-branch      Default branch name (overrides config)
+#   --theme               Code highlighting theme (default "github")
+#   --theme-light         Light theme override
+#   --theme-dark          Dark theme override
+#   --minify              Minify generated HTML
+#   --gzip                Generate .gz files in addition
+#   --git                 Generate Git dumb HTTP protocol files
+#   --inline-styles       Embed CSS in HTML instead of external files
+#   --output              Output directory (default "output")