1
0
mirror of https://git.sr.ht/~adnano/kiln synced 2024-09-19 01:31:36 +02:00

Update dependency

This commit is contained in:
adnano 2020-10-24 17:11:30 -04:00
parent 101ed843b8
commit 1c640990a2
3 changed files with 8 additions and 8 deletions

2
go.mod
View File

@ -2,4 +2,4 @@ module kiln
go 1.15
require git.sr.ht/~adnano/gmi v0.1.0-alpha.1
require git.sr.ht/~adnano/go-gemini v0.1.0

4
go.sum
View File

@ -1,2 +1,2 @@
git.sr.ht/~adnano/gmi v0.1.0-alpha.1 h1:5sha5ucev32U95drEEaPw9rm6hGWJtL8y5HViQ3VDJQ=
git.sr.ht/~adnano/gmi v0.1.0-alpha.1/go.mod h1:t/m2KtH+7lXIF7jjVN+bNvwPbE0nxHOpvlA/WZ/KeLQ=
git.sr.ht/~adnano/go-gemini v0.1.0 h1:UqRT90kR+/8q5s/JemmDPH6A9VocBezIuWbOpZYBypU=
git.sr.ht/~adnano/go-gemini v0.1.0/go.mod h1:If1VxEWcZDrRt5FeAFnGTcM2Ud1E3BXs3VJ5rnZWKq0=

10
main.go
View File

@ -13,7 +13,7 @@ import (
"text/template"
"time"
"git.sr.ht/~adnano/gmi"
"git.sr.ht/~adnano/go-gemini"
)
const (
@ -152,13 +152,13 @@ func run() error {
// serve the site
func serve() error {
server := &gmi.Server{}
cert, err := gmi.NewCertificate("localhost", time.Hour)
var server gemini.Server
cert, err := gemini.NewCertificate("localhost", time.Hour)
if err != nil {
return err
}
server.CertificateStore.Add("localhost", cert)
server.Handle("localhost", gmi.FileServer(gmi.Dir("dst")))
server.Register("localhost", gemini.FileServer(gemini.Dir("dst")))
return server.ListenAndServe()
}
@ -445,7 +445,7 @@ func outputHTML(p *Page) (path string, content []byte) {
path = filepath.Join(p.Permalink, indexPath)
r := bytes.NewReader(p.content)
text := gmi.Parse(r)
text := gemini.Parse(r)
content = []byte(text.HTML())
type tmplCtx struct {