Switch to "html/template" and improve the package page
This improves the look of each "package" page, especially with more useful information and links. 👍 Also, this switches the Git clone URLs to "https" (see https://help.github.com/articles/which-remote-url-should-i-use/), and adds an explicit "URL" for each package so we can link to browsable source code.
This commit is contained in:
parent
2fd844bd80
commit
4f39be8f0c
3 changed files with 41 additions and 10 deletions
15
template.html
Normal file
15
template.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html><html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ .Path }}</title>
|
||||
<meta name="go-import" content="{{ .Path }} git {{ .Repo }}">
|
||||
</head>
|
||||
<body>
|
||||
<div>package: <code>{{ .Path }}</code></div>
|
||||
<div>source: <a href="{{ .Url }}">{{ .Url }}</a></div>
|
||||
<div>godocs:<ul>
|
||||
<li><a href="https://godoc.org/{{ .Path }}">{{ .Path }}</a></li>{{range .Packages}}
|
||||
<li><a href="https://godoc.org/{{ $.Path }}/{{ . }}">{{ $.Path }}/{{ . }}</a></li>{{end}}
|
||||
</ul></div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue