ref: d361e1b783f15e567057c15568c0b74c45893f65
parent: 8051ddedc2b0571549b25d851aeb949b8d4bb88a
author: phil9 <telephil9@gmail.com>
date: Sun Feb 7 15:18:53 EST 2021
home page revamping repositories are now listed from the homepage change logo move some content from homepage to external pages
--- a/common.rc
+++ b/common.rc
@@ -49,7 +49,7 @@
author=`"{htcat /mnt/git/object/$phash/author | awk '{print $1}'}
shorthash=`{echo $phash | awk '{print substr($0, 0, 8)}'}
echo ' <div id="commit">
- <a href=/git/'$puser/$prepo/$phash'/commit.html>'$shorthash'</a>
+ <a href=/'$puser/$prepo/$phash'/commit.html>'$shorthash'</a>
– '$author' – '$"date'
<pre>'$"message'</pre>
</div>'
@@ -71,7 +71,7 @@
commithash=`{cat /mnt/git/object/$commithash/parent | sed 1q}
}
if(! ~ $"commithash '')
- echo '<a href="/git/'$puser/$prepo/$commithash'/log.html">Next</a>'
+ echo '<a href="/'$puser/$prepo/$commithash'/log.html">Next</a>'
cd $d
}
@@ -179,13 +179,13 @@
phash=$3
prelude $puser $prepo
- echo ' <h1><a href="/git/repos.html">Git</a>:
- <a href="/git/'$puser/$prepo/$phash'/info.html">'$prepo'</a></h1>
+ echo ' <h1><a href="/">shithub</a>:
+ <a href="/'$puser/$prepo/$phash'/info.html">'$prepo'</a></h1>
<div id="linkbar">
- <a href="/git/'$puser/$prepo/$phash'/info.html">Info</a>
+ <a href="/'$puser/$prepo/$phash'/info.html">Info</a>
•
- <a href="/git/'$puser/$prepo/$phash'/files.html">Files</a>
+ <a href="/'$puser/$prepo/$phash'/files.html">Files</a>
•
- <a href="/git/'$puser/$prepo/$phash'/log.html">Log</a>
+ <a href="/'$puser/$prepo/$phash'/log.html">Log</a>
</div>'
}
--- /dev/null
+++ b/contributing.html
@@ -1,0 +1,135 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style type="text/css">
+ body{
+ padding: 3em;
+ margin: auto;
+ min-width: 50em;
+ width: min-content;
+ font-family: sans-serif;
+ tab-space: 8;
+ }
+ h1{
+ font-size: 1.5em;
+ color: #4c4c99;
+ }
+ h2{
+ font-size: 1.3em;
+ color: #4c4c99;
+ }
+ h3{
+ font-size: 1em;
+ color: #4c4c99;
+ }
+
+ #code{
+ background: #ffffea;
+ border: 1px solid #99994c;
+ overflow: auto;
+ padding: 4px;
+ }
+
+ #commit{
+ font-family: sans-serif;
+ background: #eeeeee;
+ border: 1px solid #cccccc;
+ padding: 4px;
+ }
+
+ #diff{
+ font-family: monospace;
+ border: 2px solid #efefef;
+ }
+
+ #diff #files{
+ background: #efefef;
+ margin: 0em;
+ }
+
+ #diff #sep{
+ background: #eaffff;
+ margin: 0em;
+ }
+
+ #diff #add{
+ background: #e6ffed;
+ margin: 0em;
+ }
+
+ #diff #del{
+ background: #ffeef0;
+ margin: 0em;
+ }
+ #diff #ctx{
+ margin: 0em;
+ }
+ </style>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta name="viewport" content="width=device-width,initial-scale=1">
+ <title>Shithub: shithub: the scented git host</title>
+</head>
+<body>
+
+<a href="/">
+<img src="/static/shithub.png"/>
+</a>
+<br>
+
+<h2>Contributing</h2>
+
+<p>The code running this site is fully open source.
+It is hosted on shithub, here:</p>
+<pre>
+ <a href="/git/ori/shithub/HEAD/info.html">gits://shithub.us/ori/shithub</a>
+</pre>
+</p>
+
+<h3>Missing Features</h3>
+<p>
+<dl>
+ <dt><b>9p</b></dt>
+ <dd>
+ Right now, shithub provides no 9p
+ interface. Providing the repositories
+ directly over 9p is pointless, but
+ mounting each repositories git/fs
+ all the time could lead to excessive
+ memory use, since git/fs caches too
+ aggressively. Work on useful 9p browsing
+ is needed.
+ </dd>
+ <dt><b>Bug tracking</b></dt>
+ <dd>
+ It should be possible to report bugs in
+ a repository, add additional information,
+ and view discussion. Perhaps commenting
+ can be email-only on a public address.
+ </dd>
+ <dt><b>Patch submission</b></dt>
+ <dd>
+ It should be possible to submit patches.
+ Maybe this should be subsumed by the bug
+ tracking system.
+ </dd>
+ <dt><b>Continuous builds</b></dt>
+ <dd>
+ It'd be nice to have this, server costs
+ permitting.
+ </dd>
+ <dt><b>Hjgit for unix</b></dt>
+ <dd>
+ Right now, you need to push to shithub
+ from 9front. Porting 'tlsclient' with
+ dp9ik auth would allow pushing from unix.
+ </dd>
+ <dt>
+ <dt><b>More</b></dt>
+ <dd>
+ This list is incomplete.
+ </dd>
+ <dt>
+</dl>
+
+</body>
+</html>
--- a/gitrules
+++ b/gitrules
@@ -1,10 +1,11 @@
-/repos.html /bin/shithub/list /usr/git
-/([^'/]+)/([^'/]+)/([^'/]+)/info.html /bin/shithub/info /usr/git '\1' '\2' '\3'
-/([^'/]+)/([^'/]+)/([^'/]+)/files.html /bin/shithub/files /usr/git '\1' '\2' '\3'
-/([^'/]+)/([^'/]+)/([^'/]+)/snap.tar.gz /bin/shithub/tar /usr/git '\1' '\2' '\3'
-/([^'/]+)/([^'/]+)/([^'/]+)/(([^']+)/)?f.html /bin/shithub/view /usr/git '\1' '\2' '\3' '\5'
-/([^'/]+)/([^'/]+)/([^'/]+)/(([^']+)/)?raw /bin/shithub/viewraw /usr/git '\1' '\2' '\3' '\5'
-/([^'/]+)/([^'/]+)/([^'/]+)/log.html /bin/shithub/log /usr/git '\1' '\2' '\3'
-/([^'/]+)/([^'/]+)/([^'/]+)/commit.html /bin/shithub/show /usr/git '\1' '\2' '\3'
-/([^'/]+)/([^'/]+)/([^'/]+)/patch /bin/shithub/patch /usr/git '\1' '\2' '\3'
-/([^'/]+)/([^'/]+)/([^'/]+)/feed.rss /bin/shithub/feed /usr/git '\1' '\2' '\3'
+#/(shithub.png) /bin/shithub/static /usr/git '\1'
+/index.html /bin/shithub/list /usr/git
+([^'/]+)/([^'/]+)/([^'/]+)/info.html /bin/shithub/info /usr/git '\1' '\2' '\3'
+([^'/]+)/([^'/]+)/([^'/]+)/files.html /bin/shithub/files /usr/git '\1' '\2' '\3'
+([^'/]+)/([^'/]+)/([^'/]+)/snap.tar.gz /bin/shithub/tar /usr/git '\1' '\2' '\3'
+([^'/]+)/([^'/]+)/([^'/]+)/(([^']+)/)?f.html /bin/shithub/view /usr/git '\1' '\2' '\3' '\5'
+([^'/]+)/([^'/]+)/([^'/]+)/(([^']+)/)?raw /bin/shithub/viewraw /usr/git '\1' '\2' '\3' '\5'
+([^'/]+)/([^'/]+)/([^'/]+)/log.html /bin/shithub/log /usr/git '\1' '\2' '\3'
+([^'/]+)/([^'/]+)/([^'/]+)/commit.html /bin/shithub/show /usr/git '\1' '\2' '\3'
+([^'/]+)/([^'/]+)/([^'/]+)/patch /bin/shithub/patch /usr/git '\1' '\2' '\3'
+([^'/]+)/([^'/]+)/([^'/]+)/feed.rss /bin/shithub/feed /usr/git '\1' '\2' '\3'
--- /dev/null
+++ b/guide.html
@@ -1,0 +1,143 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style type="text/css">
+ body{
+ padding: 3em;
+ margin: auto;
+ min-width: 50em;
+ width: min-content;
+ font-family: sans-serif;
+ tab-space: 8;
+ }
+ h1{
+ font-size: 1.5em;
+ color: #4c4c99;
+ }
+ h2{
+ font-size: 1.3em;
+ color: #4c4c99;
+ }
+ h3{
+ font-size: 1em;
+ color: #4c4c99;
+ }
+
+ #code{
+ background: #ffffea;
+ border: 1px solid #99994c;
+ overflow: auto;
+ padding: 4px;
+ }
+
+ #commit{
+ font-family: sans-serif;
+ background: #eeeeee;
+ border: 1px solid #cccccc;
+ padding: 4px;
+ }
+
+ #diff{
+ font-family: monospace;
+ border: 2px solid #efefef;
+ }
+
+ #diff #files{
+ background: #efefef;
+ margin: 0em;
+ }
+
+ #diff #sep{
+ background: #eaffff;
+ margin: 0em;
+ }
+
+ #diff #add{
+ background: #e6ffed;
+ margin: 0em;
+ }
+
+ #diff #del{
+ background: #ffeef0;
+ margin: 0em;
+ }
+ #diff #ctx{
+ margin: 0em;
+ }
+ </style>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta name="viewport" content="width=device-width,initial-scale=1">
+ <title>Shithub: shithub: the fragrant git host</title>
+</head>
+<body>
+<a href="/">
+<img src="/static/shithub.png"/>
+</a>
+<br>
+
+<h2>Using Shithub</h2>
+
+Creating a repository:
+
+<pre>
+ rcpu -h shithub.us \
+ -c newrepo -d 'description' \
+ -c 'contact@me.com' repo
+ git/push -u hjgit://shithub.us/$user/repo
+</pre>
+
+<p>Your repositories live under</p>
+
+<pre>
+ /usr/git/$user
+</pre>
+
+<p>A repo contains a few control files for the web
+interface. All of them live under the repository,
+in /usr/git/$user/$repo/.git/$file. These are the
+control files that are currently supported:</p>
+
+<p>
+<dl>
+<dt><code>webpublish</code></dt>
+<dd>If this file exists, then the repository is
+published in the public web list of repositories.
+</dd>
+<dt><code>desc, description</code></dt>
+<dd>The short description of the repository. It shows
+up in the repo list.</dd>
+<dt><code>contact</code></dt>
+<dd>Contact information for submitting patches.
+Shows up on the repository info page.</dd>
+<dt><code>README</code></dt>
+<dd>A readme file, shown in the info page of the
+repository. If this file is not present, then a
+README from within the repository will be used,
+and if neither exist, then the description will
+be used.</dd>
+</dl>
+</p>
+
+<p>You can cd into there create the repository,
+and flag them as web-visible by hand, or you can
+use the <code>newrepo</code>
+script, which is a small wrapper around <code>
+git/init</code> that creates the control files:</p>
+
+<pre>
+ newrepo [-d description] [-c contact] reponame
+</pre>
+
+<p>
+README files in the repo will be rendered,
+but if you don't want to clutter root of your
+repository with junk, you can also add
+README files here:
+</p>
+
+<pre>
+ /usr/git/$user/$repo/.git/README
+</pre>
+
+</body>
+</html>
--- a/index.html
+++ /dev/null
@@ -1,188 +1,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
- <style type="text/css">
- body{
- padding: 2em;
- margin: auto;
- max-width: 50em;
- font-family: sans-serif;
- }
- h1{
- font-size: 1.5em;
- color: #4c4c99;
- }
- h2{
- font-size: 1.3em;
- color: #4c4c99;
- }
- h3{
- font-size: 1em;
- color: #4c4c99;
- }
- pre{
- font-size: 0.8em;
- background: #ffffea;
- }
- </style>
- <link rel="alternate" type="application/rss+xml" href="feed.rss" title="rss">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <title>Shithub</title>
-</head>
-<body>
-<h1>Shithub</h1>
-<h2>The Scented Git Host</h2>
-
-<p>Shithub is a site for hosting git repositories. It's
-running on <a href="https://orib.dev/git9.html">git9</a>,
-hosted on <a href=http://9front.org>9front</a>.</p>
-
-<p align="center"><img src=toilet.jpg></p>
-
-<h2>Code</h2>
-
-<p><a href="git/repos.html">Repo List</a></p>
-
-<p><a href="http://git.pmikkelsen.com">pmikkelsens mirror</a></p>
-
-<h2>Getting A Shithub Account</h2>
-
-<p>To get an account, email <a href="mailto:ori@eigenstate.org">
-Ori Bernstein <ori@eigenstate.org></a>, and ask for an
-account.</p>
-
-<h2>Missing Features</h2>
-
-<p>Shithub is a new service, written by someone who
-avoids browsers. As a result, the web interface is
-missing a number of features</p>
-
-<p>
-<dl>
- <dt><b>9p</b></dt>
- <dd>
- Right now, shithub provides no 9p
- interface. Providing the repositories
- directly over 9p is pointless, but
- mounting each repositories git/fs
- all the time could lead to excessive
- memory use, since git/fs caches too
- aggressively. Work on useful 9p browsing
- is needed.
- </dd>
- <dt><b>Bug tracking</b></dt>
- <dd>
- It should be possible to report bugs in
- a repository, add additional information,
- and view discussion. Perhaps commenting
- can be email-only on a public address.
- </dd>
- <dt><b>Patch submission</b></dt>
- <dd>
- It should be possible to submit patches.
- Maybe this should be subsumed by the bug
- tracking system.
- </dd>
- <dt><b>Continuous builds</b></dt>
- <dd>
- It'd be nice to have this, server costs
- permitting.
- </dd>
- <dt><b>Hjgit for unix</b></dt>
- <dd>
- Right now, you need to push to shithub
- from 9front. Porting 'tlsclient' with
- dp9ik auth would allow pushing from unix.
- </dd>
- <dt>
- <dt><b>More</b></dt>
- <dd>
- This list is incomplete.
- </dd>
- <dt>
-</dl>
-
-<h2>Using Shithub</h2>
-
-Creating a repository:
-
-<pre>
- rcpu -h shithub.us \
- -c newrepo -d 'description' \
- -c 'contact@me.com' repo
- git/push -u hjgit://shithub.us/$user/repo
-</pre>
-
-<p>Your repositories live under</p>
-
-<pre>
- /usr/git/$user
-</pre>
-
-<p>A repo contains a few control files for the web
-interface. All of them live under the repository,
-in /usr/git/$user/$repo/.git/$file. These are the
-control files that are currently supported:</p>
-
-<p>
-<dl>
-<dt><code>webpublish</code></dt>
-<dd>If this file exists, then the repository is
-published in the public web list of repositories.
-</dd>
-<dt><code>desc, description</code></dt>
-<dd>The short description of the repository. It shows
-up in the repo list.</dd>
-<dt><code>contact</code></dt>
-<dd>Contact information for submitting patches.
-Shows up on the repository info page.</dd>
-<dt><code>README</code></dt>
-<dd>A readme file, shown in the info page of the
-repository. If this file is not present, then a
-README from within the repository will be used,
-and if neither exist, then the description will
-be used.</dd>
-</dl>
-</p>
-
-<p>You can cd into there create the repository,
-and flag them as web-visible by hand, or you can
-use the <code>newrepo</code>
-script, which is a small wrapper around <code>
-git/init</code> that creates the control files:</p>
-
-<pre>
- newrepo [-d description] [-c contact] reponame
-</pre>
-
-<p>
-README files in the repo will be rendered,
-but if you don't want to clutter root of your
-repository with junk, you can also add
-README files here:
-</p>
-
-<pre>
- /usr/git/$user/$repo/.git/README
-</pre>
-
-<p>The code running this site is fully open source.
-It's hosted on shithub, here:</p>
-
-<pre>
- <a href="/git/ori/shithub/HEAD/info.html">gits://shithub.us/ori/shithub</a>
-</pre>
-
-<p>I'd eventually like it to grow some basic
-features for reviewing and discussing patches,
-maybe based around mailing lists, though the
-ideas are still rough.</p>
-
-<p>Things are pretty early -- the web UI is brand
-new and rather rudimentary, so improvements are
-gladly welcome.</p>
-
-</body>
-</html>
--- a/list
+++ b/list
@@ -9,8 +9,31 @@
nl='
'
-prelude '' Repolist
-echo ' <h1>Repos</h1>'
+prelude '' 'shithub: the fragrant git host'
+echo ' <img src="/static/shithub.png" />
+ <br/>
+
+ <p>Shithub is a site for hosting git repositories. It is
+ running on <a href="https://orib.dev/git9.html">git9</a>,
+ hosted on <a href=http://9front.org>9front</a>.</p>
+
+ <p>To get an account, email <a href="mailto:ori@eigenstate.org">
+ Ori Bernstein <ori@eigenstate.org></a>.</p>
+
+ <p>To get started using shithub, read our <a href="/static/guide.html">
+ user guide</a></p>
+
+ <p>Shithub is a community service, written by people who
+ avoids browsers. As a result, the web interface is
+ missing a number of features.<br/>
+ Take a look at how you could <a href="/static/contributing.html">contribute</a>.
+ </p>
+
+'
+echo ' <h2>Repositories</h2>
+ A mirror is available at <a href="http://git.pmikkelsen.com">pmikkelsens</a>
+ <br/>'
+
udir=()
for(repo in `$nl{ls */}){
ndir=`{basename -d $repo}
@@ -22,7 +45,7 @@
udir=$ndir
}
if(test -e $repo/.git/webpublish){
- echo '<dt><a href="/git/'$repo'/HEAD/info.html">'$repo'</a></dt>'
+ echo '<dt><a href="/'$repo'/HEAD/info.html">'$repo'</a></dt>'
echo '<dd>'
if(test -f $repo/.git/desc)
htcat $repo/.git/desc
--- a/log
+++ b/log
@@ -36,7 +36,7 @@
}
cd /mnt/git/$ref/tree
echo ' <p>
- <a href="/git/'$gituser/$repo'/HEAD/feed.rss">RSS feed</a>
+ <a href="/'$gituser/$repo'/HEAD/feed.rss">RSS feed</a>
</p>
<p>'
shortlog $gituser $repo $ref 100
--- a/mkfile
+++ b/mkfile
@@ -17,8 +17,9 @@
common.rc
WEBFILES=\
- index.html\
- toilet.jpg
+ shithub.png\
+ guide.html\
+ contributing.html\
install:
mkdir -p /rc/bin/shithub
--- a/show
+++ b/show
@@ -27,12 +27,12 @@
date=`''{date `{mtime /mnt/git/$ref/msg | awk '{print $1}'}}
msg=`''{htcat /mnt/git/$ref/msg}
echo ' <p>
- <a href="/git/'$gituser/$repo/$refname'/patch">Download patch</a><br/>
+ <a href="/'$gituser/$repo/$refname'/patch">Download patch</a><br/>
</p>
<p>
- <b>ref:</b> <a href="/git/'$gituser/$repo/$refname'/files.html">'$refname'</a><br/>'
+ <b>ref:</b> <a href="/'$gituser/$repo/$refname'/files.html">'$refname'</a><br/>'
if(! ~ $#oldcommit 0) {
- echo '<b>parent:</b> <a href="/git/'$gituser/$repo/$oldcommit'/files.html">'$oldcommit'</a><br/>'
+ echo '<b>parent:</b> <a href="/'$gituser/$repo/$oldcommit'/files.html">'$oldcommit'</a><br/>'
}
echo ' <b>author:</b> '$author'<br/>
<b>date:</b> '$date'
binary files a/toilet.jpg /dev/null differ
--- a/view
+++ b/view
@@ -27,10 +27,10 @@
user_prelude $gituser $repo $hash
echo ' <p>
- <b>ref:</b> <a href="'/git/$gituser/$repo/$hash/files.html'">'$hash'</a><br/>
+ <b>ref:</b> <a href="'/$gituser/$repo/$hash/files.html'">'$hash'</a><br/>
</p>'
if(test -f $file){
- echo ' <a href="'/git/$gituser/$repo/$hash/$file'/raw">View raw version</a>'
+ echo ' <a href="'/$gituser/$repo/$hash/$file'/raw">View raw version</a>'
type=`{file -m $file}
switch($type){
case text/*
@@ -38,7 +38,7 @@
htcat $file
echo ' </pre>'
case image/*
- echo ' <br/><div><img src="'/git/$gituser/$repo/$hash/$file'/raw" /></div>'
+ echo ' <br/><div><img src="'/$gituser/$repo/$hash/$file'/raw" /></div>'
case *
echo ' <p>Binary file not displayed</p>'
}