]> git.armaanb.net Git - stagit.git/blob - README.md
do not simplify the history by first-parent
[stagit.git] / README.md
1 # stagit
2 > static git page generator.
3
4 Personal fork with fast syntax highlighting via Chroma, markdown rendering, and some other style and quality of life improvements.
5
6 It generates static HTML pages for a Git repository.
7
8 ## Usage
9 Make files per repository:
10
11 ```
12 $ mkdir -p htmldir && cd htmldir
13 $ stagit path-to-repo
14 ```
15
16 Make index file for repositories:
17
18 ```
19 $ stagit-index repodir1 repodir2 repodir3
20 ```
21
22 ## Build and install
23
24 ```
25 $ make
26 # make install
27 ```
28
29 ## Dependencies
30   - C compiler (C99).
31   - libc (tested with OpenBSD, FreeBSD, NetBSD, Linux: glibc and musl).
32   - libgit2 (v0.22+).
33   - Chroma (optional - for syntax highlighting).
34   - libcmark-gfm (optional - for rendering Markdown).
35   - POSIX make (optional).
36   - pkg-config (if using the makefile).
37
38 ## Documentation
39 See man pages: stagit(1) and stagit-index(1).
40
41 ## Features
42   - Log of all commits from HEAD.
43   - Log and diffstat per commit.
44   - Show file tree with linkable line numbers.
45   - Show references: local branches and tags.
46   - Detect README and LICENSE file from HEAD and link it as a webpage.
47   - Detect submodules (.gitmodules file) from HEAD and link it as a webpage.
48   - Atom feed log (atom.xml).
49   - Make index page for multiple repositories with stagit-index.
50   - After generating the pages (relatively slow) serving the files is very fast, simple and requires little resources (because the content is static), only a HTTP file server is required.
51   - Usable with text-browsers such as dillo, links, lynx and w3m.
52   - Render Markdown files to HTML.
53   - Syntax highlighting.
54
55 ## Cons
56 ### Large repositories
57   - Not suitable for large repositories (2000+ commits), because diffstats are an expensive operation, the cache (-c flag) is a workaround for this in some cases.
58   - Not suitable for large repositories with many files, because all files are written for each execution of stagit. This is because stagit shows the lines of textfiles and there is no "cache" for file metadata (this would add more complexity to the code).
59   - Not suitable for repositories with many branches, a quite linear history is assumed (from HEAD).
60
61 In these cases it is better to just use cgit or possibly change stagit to run as a CGI program.
62
63 ### Not as featureful as cgit
64   - Does not support some of the dynamic features cgit has, like: Snapshot tarballs per commit.
65     - File tree per commit.
66     - History log of branches diverged from HEAD.
67     - Stats (git shortlog -s).
68
69 This is by design, just use Git locally.
70
71 ## Copyright
72 stagit is licensed under the MIT/X Consortium License, please refer to the "LICENSE" file for more information.