STAGIT(1)

πŸ“¦
version 1.2 Β· 2 versions
, in alpine 3.24, nixos 26.05

πŸ’– stagit(1) πŸ’–

okay so welcome to the General Commands Manual page for stagit, bestie β€” this is the static git page generator and we are gonna make it make sense. no cap. 🫢

🌸 NAME 🌸

stagit β€” static git page generator

✨ SYNOPSIS ✨

stagit [-c cachefile] [-l commits] [-u baseurl] repodir

πŸ’– DESCRIPTION πŸ’–

stagit writes HTML pages for the repository repodir to the current directory. literally the whole point. ✨

The options are as follows, bestie:

  • -c cachefile β€” cache the entries of the log page up to the point of the last commit. The cachefile will store the last commit id and the entries in the HTML table. It is up to the user to make sure the state of the cachefile is in sync with the history of the repository. 🫢
  • -l commits β€” write a maximum number of commits to the log.html file only. However the commit files are written as usual.
  • -u baseurl β€” base URL to make links in the Atom feeds absolute. For example: https://git.codemadness.org/stagit/.
🚨 bestie, the options -c and -l cannot be used at the same time. periodt.

The following files will be written:

  • atom.xml β€” Atom XML feed of the last 100 commits.
  • tags.xml β€” Atom XML feed of the tags.
  • files.html β€” list of files in the latest tree, linking to the file.
  • log.html β€” list of commits in reverse chronological applied commit order, each commit links to a page with a diffstat and diff of the commit.
  • refs.html β€” lists references of the repository such as branches and tags.

For each entry in HEAD a file will be written in the format: file/filepath.html. This file will contain the textual data of the file prefixed by line numbers. The file will have the string "Binary file" if the data is considered to be non-textual. πŸ‘€

For each commit a file will be written in the format: commit/commitid.html. This file will contain the diffstat and diff of the commit. It will write the string "Binary files differ" if the data is considered to be non-textual. Too large diffs will be suppressed and a string "Diff is too large, output suppressed" will be written. πŸ’€

When a commit HTML file exists it won't be overwritten again, note that if you've changed stagit or changed one of the metadata files of the repository it is recommended to recreate all the output files because it will contain old data. To do this remove the output directory and cachefile, then recreate the files. no cap, that part matters. 🫢

The basename of the directory is used as the repository name. The suffix .git is removed from the basename, this suffix is commonly used for "bare" repos.

The content of the following files specifies the metadata for each repository:

  • .git/description or description (bare repo). β€” description
  • .git/owner or owner (bare repo). β€” owner of repository
  • .git/url or url (bare repo). β€” primary clone URL of the repository, for example: git://git.codemadness.org/stagit

When a README or LICENSE file exists in HEAD or a .gitmodules submodules file exists in HEAD a direct link in the menu is made. cute. πŸŽ€

For changing the style of the page you can use the following files:

  • favicon.png β€” favicon image.
  • logo.png β€” 32x32 logo.
  • style.css β€” CSS stylesheet.

πŸŽ€ EXIT STATUS πŸŽ€

The stagit utility exits 0 on success, and >0 if an error occurs.

πŸ¦‹ EXAMPLES πŸ¦‹

mkdir -p htmlroot/htmlrepo1 && cd htmlroot/htmlrepo1
stagit path/to/gitrepo1
# repeat for other repositories.

To update the HTML files when the repository is changed a git post-receive hook can be used, see the file example_post-receive.sh for an example. πŸ¦‹

πŸ”₯ SEE ALSO πŸ”₯

stagit-index(1)

πŸ‘‘ AUTHORS πŸ‘‘

Hiltjo Posthuma <hiltjo@codemadness.org>


πŸ’– source/version vibes: Debian, dated August 2, 2021, manual STAGIT(1) β€” okay bye bestie, slay! πŸ’–

πŸ“¦ where this page comes from