URI:
       stagit.html - www.codemadness.org - www.codemadness.org saait content files
  HTML git clone git://git.codemadness.org/www.codemadness.org
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
       stagit.html (5068B)
       ---
            1 <!DOCTYPE html>
            2 <html dir="ltr" lang="en">
            3 <head>
            4         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            5         <meta http-equiv="Content-Language" content="en" />
            6         <meta name="viewport" content="width=device-width" />
            7         <meta name="keywords" content="OpenBSD httpd, stagit, cgit" />
            8         <meta name="description" content="a static git page generator" />
            9         <meta name="author" content="Hiltjo" />
           10         <meta name="generator" content="Static content generated using saait: https://codemadness.org/saait.html" />
           11         <title>Stagit: a static git page generator - Codemadness</title>
           12         <link rel="stylesheet" href="style.css" type="text/css" media="screen" />
           13         <link rel="stylesheet" href="print.css" type="text/css" media="print" />
           14         <link rel="alternate" href="atom.xml" type="application/atom+xml" title="Codemadness Atom Feed" />
           15         <link rel="alternate" href="atom_content.xml" type="application/atom+xml" title="Codemadness Atom Feed with content" />
           16         <link rel="icon" href="/favicon.png" type="image/png" />
           17 </head>
           18 <body>
           19         <nav id="menuwrap">
           20                 <table id="menu" width="100%" border="0">
           21                 <tr>
           22                         <td id="links" align="left">
           23                                 <a href="index.html">Blog</a> |
           24                                 <a href="/git/" title="Git repository with some of my projects">Git</a> |
           25                                 <a href="/releases/">Releases</a> |
           26                                 <a href="gopher://codemadness.org">Gopherhole</a>
           27                         </td>
           28                         <td id="links-contact" align="right">
           29                                 <span class="hidden"> | </span>
           30                                 <a href="feeds.html">Feeds</a> |
           31                                 <a href="pgp.asc">PGP</a> |
           32                                 <a href="mailto:hiltjo@AT@codemadness.DOT.org">Mail</a>
           33                         </td>
           34                 </tr>
           35                 </table>
           36         </nav>
           37         <hr class="hidden" />
           38         <main id="mainwrap">
           39                 <div id="main">
           40                         <article>
           41 <header>
           42         <h1>Stagit: a static git page generator</h1>
           43         <p>
           44         <strong>Last modification on </strong> <time>2021-04-11</time>
           45         </p>
           46 </header>
           47 
           48 <p>stagit is a static page generator for git.</p>
           49 <p><a href="/git/stagit/file/README.html">Read the README for more information about it.</a></p>
           50 <p>My git repository uses stagit, you can see how it looks here:
           51 <a href="https://codemadness.org/git/">https://codemadness.org/git/</a></p>
           52 <h2>Features</h2>
           53 <ul>
           54 <li>Log of all commits from HEAD.</li>
           55 <li>Log and diffstat per commit.</li>
           56 <li>Show file tree with linkable line numbers.</li>
           57 <li>Show references: local branches and tags.</li>
           58 <li>Detect README and LICENSE file from HEAD and link it as a webpage.</li>
           59 <li>Detect submodules (.gitmodules file) from HEAD and link it as a webpage.</li>
           60 <li>Atom feed of the commit log (atom.xml).</li>
           61 <li>Atom feed of the tags/refs (tags.xml).</li>
           62 <li>Make index page for multiple repositories with stagit-index.</li>
           63 <li>After generating the pages (relatively slow) serving the files is very fast,
           64 simple and requires little resources (because the content is static), only
           65 a HTTP file server is required.</li>
           66 <li>Security: all pages are static. No CGI or dynamic code is run for the
           67 interface. Using it with a secure httpd such as OpenBSD httpd it is
           68 privilege-separated, chroot(2)'d and pledge(2)'d.</li>
           69 <li>Simple to setup: the content generation is clearly separated from serving
           70 it. This makes configuration as simple as copying a few directories and
           71 scripts.</li>
           72 <li>Usable with text-browsers such as dillo, links, lynx and w3m.</li>
           73 </ul>
           74 <h2>Cons</h2>
           75 <ul>
           76 <li>Not suitable for large repositories (2000+ commits), because diffstats are
           77 an expensive operation, the cache (-c flag) or (-l maxlimit) is a workaround
           78 for this in some cases.</li>
           79 <li>Not suitable for large repositories with many files, because all files are
           80 written for each execution of stagit. This is because stagit shows the lines
           81 of textfiles and there is no "cache" for file metadata (this would add more
           82 complexity to the code).</li>
           83 <li>Not suitable for repositories with many branches, a quite linear history is
           84 assumed (from HEAD).</li>
           85 </ul>
           86 <p>In these cases it is better to use <a href="https://git.zx2c4.com/cgit/">cgit</a> or
           87 possibly change stagit to run as a CGI program.</p>
           88 <ul>
           89 <li>Relatively slow to run the first time (about 3 seconds for sbase,
           90 1500+ commits), incremental updates are faster.</li>
           91 <li>Does not support some of the dynamic features cgit has, like:
           92 <ul>
           93 <li>Snapshot tarballs per commit.</li>
           94 <li>File tree per commit.</li>
           95 <li>History log of branches diverged from HEAD.</li>
           96 <li>Stats (git shortlog -s).</li>
           97 </ul>
           98 </li>
           99 </ul>
          100 <p>This is by design, just use git locally.</p>
          101 <h2>Clone</h2>
          102 <pre><code>git clone git://git.codemadness.org/stagit
          103 </code></pre>
          104 <h2>Browse</h2>
          105 <p>You can browse the source-code at:</p>
          106 <ul>
          107 <li><a href="https://git.codemadness.org/stagit/">https://git.codemadness.org/stagit/</a></li>
          108 <li><a href="gopher://codemadness.org/1/git/stagit">gopher://codemadness.org/1/git/stagit</a></li>
          109 </ul>
          110 <h2>Download releases</h2>
          111 <p>Releases are available at:</p>
          112 <ul>
          113 <li><a href="https://codemadness.org/releases/stagit/">https://codemadness.org/releases/stagit/</a></li>
          114 <li><a href="gopher://codemadness.org/1/releases/stagit">gopher://codemadness.org/1/releases/stagit</a></li>
          115 </ul>
          116 
          117                         </article>
          118                 </div>
          119         </main>
          120 </body>
          121 </html>