mirror of https://github.com/perkeep/perkeep.git
website: fix links on doc pages
Remove gerrit redirect for /doc/* links, and instead link directly to the on-site doc page. This allows us to remove special handling of any /gw/doc/* URLs. However, we also need to add special handling for /gw/server/* URLs to fix a couple of broken links on /doc/status.md. Change-Id: Ica73c3d78b47dd363c5c3e736123af2977dedb0d
This commit is contained in:
parent
1d4d49ad7a
commit
4ede70d95a
|
@ -16,7 +16,7 @@ pieces and use cases, and where they're at.</p>
|
|||
|
||||
<table class='status'>
|
||||
<tr><th>Item</th><th>Status</th><th>Notes</th></tr>
|
||||
<tr><td>Blob Server</td><td>95%</td><td>See <a href="/gw/doc/protocol">doc/protocol/</a></td></tr>
|
||||
<tr><td>Blob Server</td><td>95%</td><td>See <a href="/doc/protocol">doc/protocol/</a></td></tr>
|
||||
<tr><td>Sharing</td><td>50%</td><td>See mailing list thread "Example of sharing"</td></tr>
|
||||
<tr><td>Search API</td><td>0%</td><td>initial hand waving only</td></tr>
|
||||
</table>
|
||||
|
|
|
@ -38,15 +38,15 @@ if things here are confusing or lacking.</p>
|
|||
<ul>
|
||||
|
||||
<li><a
|
||||
href="/gw/doc/protocol/blob-get.md"><b>get</b></a>
|
||||
href="/doc/protocol/blob-get.md"><b>get</b></a>
|
||||
a blob by its blobref.</li>
|
||||
|
||||
<li><a
|
||||
href="/gw/doc/protocol/blob-upload.md"><b>put</b></a>
|
||||
href="/doc/protocol/blob-upload.md"><b>put</b></a>
|
||||
a blob by its blobref.</li>
|
||||
|
||||
<li><a
|
||||
href="/gw/doc/protocol/blob-enumerate.md"><b>enumerate</b></a>
|
||||
href="/doc/protocol/blob-enumerate.md"><b>enumerate</b></a>
|
||||
all your blobs, sorted by their blobrefs. Enumeration is
|
||||
only really used by your search server and by a <em>full sync</em>
|
||||
between your blob server mirrors.</li>
|
||||
|
@ -104,7 +104,7 @@ starts with <code>{</code> and is <a href="http://json.org/">valid JSON</a> in i
|
|||
|
||||
<p>A permanode is simply a <a href="/doc/json-signing/">signed</a>
|
||||
schema blob with no data inside that would be interesting to
|
||||
mutate. See <a href="/gw/doc/schema/permanode.md">the
|
||||
mutate. See <a href="/doc/schema/permanode.md">the
|
||||
permanode spec</a>.</p>
|
||||
|
||||
<p>A permanent reference to a mutable object then is simply the blobref of
|
||||
|
|
|
@ -267,7 +267,7 @@ func redirectPath(u *url.URL) string {
|
|||
|
||||
if strings.HasPrefix(u.Path, "/gw/") {
|
||||
path := strings.TrimPrefix(u.Path, "/gw/")
|
||||
if strings.HasPrefix(path, "doc") || strings.HasPrefix(path, "clients") {
|
||||
if strings.HasPrefix(path, "clients") || strings.HasPrefix(path, "server") {
|
||||
return gerritURLPrefix + "master/" + path
|
||||
}
|
||||
// Assume it's a commit
|
||||
|
|
|
@ -28,7 +28,7 @@ func TestRedirect(t *testing.T) {
|
|||
}{
|
||||
{"/foo", ""},
|
||||
{"/gw/502aff1fd522c454e39a3723b596aca43d206d4e", "https://camlistore.googlesource.com/camlistore/+/502aff1fd522c454e39a3723b596aca43d206d4e"},
|
||||
{"/gw/doc", "https://camlistore.googlesource.com/camlistore/+/master/doc"},
|
||||
{"/gw/server", "https://camlistore.googlesource.com/camlistore/+/master/server"},
|
||||
{"/code/?p=camlistore.git;a=commit;h=b0d2a8f0e5f27bbfc025a96ec3c7896b42d198ed", "https://camlistore.googlesource.com/camlistore/+/b0d2a8f0e5f27bbfc025a96ec3c7896b42d198ed"},
|
||||
{"/docs/schema/", "/doc/schema/"},
|
||||
|
||||
|
|
Loading…
Reference in New Issue