mirror of
https://github.com/wahyd4/golink.git
synced 2026-08-08 21:01:05 +10:00
cmd/golink: use relative links
use relative links throughout rather than hardcoding the go hostname, which allows things to continue working when other hostnames are used. Change-Id: I5df0d10214799de9722871cbad99bf9af129941f
This commit is contained in:
+1
-1
@@ -110,7 +110,7 @@ Include a "+" after a link to get information about a link without resolving it:
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Visit <a href="http://go/.export">go/.export</a> to export all saved links and their metadata in <a href="https://jsonlines.org/">JSON Lines format</a>.
|
||||
Visit <a href="/.export">go/.export</a> to export all saved links and their metadata in <a href="https://jsonlines.org/">JSON Lines format</a>.
|
||||
This is useful to create data snapshots that can be restored later.
|
||||
|
||||
<pre>{{`$ curl go/.export
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Clicks}}
|
||||
<tr class="hover:bg-gray-100 border-b border-gray-200"><td><a class="block p-2 pr-8 hover:text-blue-500 hover:underline" href="http://go/{{.Short}}">go/{{.Short}}</a></td><td class="p-2">{{.NumClicks}}</td></tr>
|
||||
<tr class="hover:bg-gray-100 border-b border-gray-200"><td><a class="block p-2 pr-8 hover:text-blue-500 hover:underline" href="/{{.Short}}">go/{{.Short}}</a></td><td class="p-2">{{.NumClicks}}</td></tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{{ define "main" }}
|
||||
<h2 class="text-xl font-bold pb-2">Success</h2>
|
||||
|
||||
<p><a class="text-blue-600 hover:underline" href="http://go/{{.Short}}">go/{{.Short}}</a> has been saved.</p>
|
||||
<p><a class="text-blue-600 hover:underline" href="/{{.Short}}">go/{{.Short}}</a> has been saved.</p>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user