Update for radicle

This commit is contained in:
Aleks Rutins 2025-06-04 16:56:27 -04:00
parent b2c1890de8
commit e316928593
3 changed files with 11 additions and 3 deletions

View file

@ -2,6 +2,12 @@ class Pages::GoMod < ::Phlex::HTML
def initialize(import, repo)
@import = import
@repo = repo
@repourl = repo.to_s
if @repourl.start_with?("https://git.farthergate.com")
@repourl = "https://git.farthergate.com/p/rad:" + @repourl.delete_prefix("https://git.farthergate.com/").delete_suffix(".git")
end
end
def view_template
render ::Pages::Layout.new({title: @import.to_s}, meta: {
@ -11,7 +17,7 @@ class Pages::GoMod < ::Phlex::HTML
h1 { @import }
p {
plain "This is a generated page to host the Go module located at "
a(href: @repo) { @repo }
a(href: @repo) { @repourl }
plain ". You'll probably find more information about it over there."
}
}