Add Go module hosting

This commit is contained in:
Aleks Rūtiņš 2025-02-14 03:11:25 +00:00
parent 7c4208375a
commit b42d31fa4c
3 changed files with 36 additions and 1 deletions

View file

@ -10,6 +10,10 @@ require_relative "pages/blog"
require_relative "pages/about"
require_relative "pages/post"
def go_modules = {
"farthergate.com/stack" => "https://git.farthergate.com/aleks/stack"
}
Phlexite::Site.new { |s|
s.build_dir = 'public'
@ -24,4 +28,8 @@ Phlexite::Site.new { |s|
posts.each do |post|
s.page "p/#{post[:slug]}/index.html", Pages::Post.new(post)
end
go_modules.each do |import, repo|
s.page "#{import.delete_prefix('farthergate.com/')}", Pages::GoMod.new(import, repo)
end
}