farthergate.com/pages/gomod.rb
Aleks Rūtiņš d5747ea69c missed a spot
2025-02-14 03:17:12 +00:00

21 lines
No EOL
510 B
Ruby

class Pages::GoMod < ::Phlex::HTML
def initialize(import, repo)
@import = import
@repo = repo
end
def view_template
render ::Pages::Layout.new({title: import}, meta: {
"go-import" => "#{import} git #{repo}"
}) {
p {
h1 { @import }
p {
plain "This is a generated page to host the Go module located at "
a(href: repo) { repo }
plain ". You'll probably find more information about it over there."
}
}
}
end
end