Add stuff for xeserv git links
This commit is contained in:
parent
a79f6bca1f
commit
3c0fbb5271
|
@ -2,6 +2,13 @@ lapis = require "lapis"
|
|||
|
||||
class Go extends lapis.Application
|
||||
[repo: "/go/:name"]: =>
|
||||
@kind = "github"
|
||||
@repo = @params.name
|
||||
|
||||
render: true
|
||||
|
||||
[repo: "/go/xeserv/*"]: =>
|
||||
@kind = "xeserv"
|
||||
@repo = @params.splat
|
||||
|
||||
render: true
|
||||
|
|
|
@ -2,4 +2,16 @@ import Widget from require "lapis.html"
|
|||
|
||||
class Repo extends Widget
|
||||
content: =>
|
||||
if @kind == "xeserv"
|
||||
meta name: "go-import", content: "christine.website/go/xeserv/#{@repo} git http://git.xeserv.us/#{repo}"
|
||||
else
|
||||
meta name: "go-import", content: "christine.website/go/#{@repo} git https://github.com/Xe/#{@repo}"
|
||||
|
||||
center ->
|
||||
h1 ->
|
||||
text "Link"
|
||||
|
||||
p class: "lead", ->
|
||||
text "This is a page for "
|
||||
a href: "http://golang.org", "Go"
|
||||
text " redirection for repository downloads. This page won't be any use to you in a browser."
|
||||
|
|
Loading…
Reference in New Issue