git-repo-styles

Design documents for git.pablopie.xyz ✏️

Commit
c2ddebb76130565991d55962eb864ca0f52a47a3
Parent
d3ec9dc3f53166eb19543e09a853cb2e75c88534
Author
Pablo <pablo-pie@riseup.net>
Date

Removed references to stagit and codemadness.org

codemadness.org is the website of Hiltjo Posthuma from suckless.org, an organization primarily composed of neonazis

Diffstat

3 files changed, 25 insertions, 180 deletions

Status File Name N° Changes Insertions Deletions
Modified README.md 3 1 2
Modified TODO.md 6 0 6
Modified readme.html 196 24 172
diff --git a/README.md b/README.md
@@ -1,5 +1,4 @@
 # Git Repos Style
 
 Design documents for <https://git.pablopie.xyz>. Visually this is mainly based
-on [sourcehut](https://sourcehut.org), but it is still a simple
-[stagit](https://codemadness.org/stagit.html) scheme.
+on [sourcehut](https://sourcehut.org).
diff --git a/TODO.md b/TODO.md
@@ -1,10 +1,4 @@
 # Future Improvements
 
 * Add a RSS feed
-  * The feed is already generated by stagit, you only need to add a link to it
 * Add license indicators other than page on the LICENSE file
-
-# Bugs
-
-* The page on the tree of some repos is broken: no files show up.
-  * This happens in the repo for stagit itself
diff --git a/readme.html b/readme.html
@@ -1,191 +1,43 @@
 <!DOCTYPE html>
-<html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<title>stagit</title>
-<link rel="icon" type="image/svg" href="https://git.pablopie.xyz/icons/favicon.svg">
-<link rel="stylesheet" type="text/css" href="./styles.css">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>git-repo-styles</title>
+<link rel="icon" type="image/svg" href="./favicon.svg" />
+<link rel="stylesheet" type="text/css" href="./styles.css" />
 </head>
 <body>
 <header>
 <nav>
-<a href="https://git.pablopie.xyz/">
+<a href="https://git.pablopie.xyz">
 <img aria-hidden="true" alt="Website logo" src="./favicon.svg">
 git.pablopie.xyz
 </a>
 </nav>
 </header>
 <main>
-<h1>stagit</h1>
-<p>My personal build of stagit 😸️
+<h1>git-repo-styles</h1>
+<p>Design documents for git.pablopie.xyz ✏️
 </p>
 <nav>
 <ul>
-<li>git clone: <a href="git://git.pablopie.xyz/stagit">git://git.pablopie.xyz/stagit</a></li>
-<li><a href="https://git.pablopie.xyz/stagit/log.html">Log</a></li>
-<li><a href="https://git.pablopie.xyz/stagit/files.html">Files</a></li>
-<li><a href="https://git.pablopie.xyz/stagit/refs.html">Refs</a></li>
-<li><a href="https://git.pablopie.xyz/stagit/README.html">README</a></li>
-<li><a href="https://git.pablopie.xyz/stagit/file/LICENSE.html">LICENSE</a></li>
+<li>git clone: <a href="git://git.pablopie.xyz/git-repo-styles">git://git.pablopie.xyz/git-repo-styles</a>
+</li>
+<li><a href="log.html">Log</a></li>
+<li><a href="files.html">Files</a></li>
+<li><a href="refs.html">Refs</a></li>
+<li><a href="README.html">README</a></li>
+<li><a rel="license" href="file/LICENSE.html">LICENSE</a></li>
 </ul>
 </nav>
 <section id="readme">
-<h1>stagit</h1>
-<p>static git page generator.</p>
-<p>It generates static HTML pages for a git repository.</p>
-<h2>Usage</h2>
-<p>Make files per repository:</p>
-<div class="codeblock"><pre><code>$ mkdir -p htmldir &amp;&amp; cd htmldir
-$ stagit path-to-repo
-</code></pre></div>
-<p>Make index file for repositories:</p>
-<div class="codeblock"><pre><code>$ stagit-index repodir1 repodir2 repodir3 &gt; index.html
-</code></pre></div>
-<h2>Build and install</h2>
-<div class="codeblock"><pre><code>$ make
-# make install
-</code></pre></div>
-<h2>Dependencies</h2>
-<ul>
-<li>C compiler (C99).</li>
-<li>libc (tested with OpenBSD, FreeBSD, NetBSD, Linux: glibc and musl).</li>
-<li>libgit2 (v0.22+).</li>
-<li><a href="https://github.com/commonmark/cmark">cmark</a>.</li>
-<li>POSIX make (optional).</li>
-</ul>
-<h2>Documentation</h2>
-<p>See man pages: stagit(1) and stagit-index(1).</p>
-<h2>Building a static binary</h2>
-<p>It may be useful to build static binaries, for example to run in a chroot.</p>
-<p>It can be done like this at the time of writing (v0.24):</p>
-<div class="codeblock"><pre><code>cd libgit2-src
-
-# change the options in the CMake file: CMakeLists.txt
-BUILD_SHARED_LIBS to OFF (static)
-CURL to OFF              (not needed)
-USE_SSH OFF              (not needed)
-THREADSAFE OFF           (not needed)
-USE_OPENSSL OFF          (not needed, use builtin)
-
-mkdir -p build &amp;&amp; cd build
-cmake ../
-make
-make install
-</code></pre></div>
-<h2>Extract owner field from git config</h2>
-<p>A way to extract the gitweb owner for example in the format:</p>
-<div class="codeblock"><pre><code>[gitweb]
-owner = Name here
-</code></pre></div>
-<p>Script:</p>
-<div class="codeblock"><pre><code>#!/bin/sh
-awk '/^[ 	]*owner[ 	]=/ {
-  sub(/^[^=]*=[ 	]*/, "");
-  print $0;
-}'
-</code></pre></div>
-<h2>Set clone url for a directory of repos</h2>
-<div class="codeblock"><pre><code>#!/bin/sh
-cd "$dir"
-for i in *; do
-  test -d "$i" &amp;&amp; echo "git://git.codemadness.org/$i" &gt; "$i/url"
-done
-</code></pre></div>
-<h2>Update files on git push</h2>
-<p>Using a post-receive hook the static files can be automatically updated.
-Keep in mind git push -f can change the history and the commits may need
-to be recreated. This is because stagit checks if a commit file already
-exists. It also has a cache (-c) option which can conflict with the new
-history. See stagit(1).</p>
-<p>git post-receive hook (repo/.git/hooks/post-receive):</p>
-<div class="codeblock"><pre><code>#!/bin/sh
-# detect git push -f
-force=0
-while read -r old new ref; do
-  hasrevs=$(git rev-list "$old" "^$new" | sed 1q)
-  if test -n "$hasrevs"; then
-    force=1
-    break
-  fi
-done
-
-# remove commits and .cache on git push -f
-#if test "$force" = "1"; then
-# ...
-#fi
-
-# see example_create.sh for normal creation of the files.
-</code></pre></div>
-<h2>Create .tar.gz archives by tag</h2>
-<div class="codeblock"><pre><code>#!/bin/sh
-name="stagit"
-mkdir -p archives
-git tag -l | while read -r t; do
-  f="archives/${name}-$(echo "${t}" | tr '/' '_').tar.gz"
-  test -f "${f}" &amp;&amp; continue
-  git archive \
-    --format tar.gz \
-    --prefix "${t}/" \
-    -o "${f}" \
-    -- \
-    "${t}"
-done
-</code></pre></div>
-<h2>Features</h2>
-<ul>
-<li>Log of all commits from HEAD.</li>
-<li>Log and diffstat per commit.</li>
-<li>Show file tree with linkable line numbers.</li>
-<li>Show references: local branches and tags.</li>
-<li>Detect README and LICENSE file from HEAD and link it as a webpage.</li>
-<li>Render <a href="https://commonmark.org/">Markdown</a> READMEs as fancy looking HTML.</li>
-<li>Detect submodules (.gitmodules file) from HEAD and link it as a webpage.</li>
-<li>Atom feed of the commit log (atom.xml).</li>
-<li>Atom feed of the tags/refs (tags.xml).</li>
-<li>Make index page for multiple repositories with stagit*index.</li>
-<li>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.</li>
-<li>Usable with text*browsers such as dillo, links, lynx and w3m.</li>
-</ul>
-<h2>Cons</h2>
-<ul>
-<li>
-<p>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.</p>
-</li>
-<li>
-<p>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).</p>
-</li>
-<li>
-<p>Not suitable for repositories with many branches, a quite linear history is
-assumed (from HEAD).</p>
-<p>In these cases it is better to just use cgit or possibly change stagit to
-run as a CGI program.</p>
-</li>
-<li>
-<p>Relatively slow to run the first time (about 3 seconds for sbase,
-1500+ commits), incremental updates are faster.</p>
-</li>
-<li>
-<p>Does not support some of the dynamic features cgit has, like:</p>
-<ul>
-<li>Snapshot tarballs per commit.</li>
-<li>File tree per commit.</li>
-<li>History log of branches diverged from HEAD.</li>
-<li>Stats (git shortlog -s).</li>
-</ul>
-<p>This is by design, just use git locally.</p>
-</li>
-</ul>
+<h1>Git Repos Style</h1>
+<p>Design documents for <a href="https://git.pablopie.xyz">https://git.pablopie.xyz</a>. Visually this is mainly based
+on <a href="https://sourcehut.org">sourcehut</a>.</p>
 </section>
-
+</div>
 </main>
-<footer>made with ❤️ by <a href="https://pablopie.xyz/">@pablo</a></footer>
-
-
-</body></html>
+<footer>made with ❤️ by <a rel="author" href="https://pablopie.xyz/">@pablo</a></footer>
+</body>
+</html>