mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 09:23:09 +00:00
Update dependency
This commit is contained in:
parent
101ed843b8
commit
1c640990a2
2
go.mod
2
go.mod
|
@ -2,4 +2,4 @@ module kiln
|
||||||
|
|
||||||
go 1.15
|
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
4
go.sum
|
@ -1,2 +1,2 @@
|
||||||
git.sr.ht/~adnano/gmi v0.1.0-alpha.1 h1:5sha5ucev32U95drEEaPw9rm6hGWJtL8y5HViQ3VDJQ=
|
git.sr.ht/~adnano/go-gemini v0.1.0 h1:UqRT90kR+/8q5s/JemmDPH6A9VocBezIuWbOpZYBypU=
|
||||||
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/go.mod h1:If1VxEWcZDrRt5FeAFnGTcM2Ud1E3BXs3VJ5rnZWKq0=
|
||||||
|
|
10
main.go
10
main.go
|
@ -13,7 +13,7 @@ import (
|
||||||
"text/template"
|
"text/template"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.sr.ht/~adnano/gmi"
|
"git.sr.ht/~adnano/go-gemini"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -152,13 +152,13 @@ func run() error {
|
||||||
|
|
||||||
// serve the site
|
// serve the site
|
||||||
func serve() error {
|
func serve() error {
|
||||||
server := &gmi.Server{}
|
var server gemini.Server
|
||||||
cert, err := gmi.NewCertificate("localhost", time.Hour)
|
cert, err := gemini.NewCertificate("localhost", time.Hour)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
server.CertificateStore.Add("localhost", cert)
|
server.CertificateStore.Add("localhost", cert)
|
||||||
server.Handle("localhost", gmi.FileServer(gmi.Dir("dst")))
|
server.Register("localhost", gemini.FileServer(gemini.Dir("dst")))
|
||||||
return server.ListenAndServe()
|
return server.ListenAndServe()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,7 +445,7 @@ func outputHTML(p *Page) (path string, content []byte) {
|
||||||
path = filepath.Join(p.Permalink, indexPath)
|
path = filepath.Join(p.Permalink, indexPath)
|
||||||
|
|
||||||
r := bytes.NewReader(p.content)
|
r := bytes.NewReader(p.content)
|
||||||
text := gmi.Parse(r)
|
text := gemini.Parse(r)
|
||||||
content = []byte(text.HTML())
|
content = []byte(text.HTML())
|
||||||
|
|
||||||
type tmplCtx struct {
|
type tmplCtx struct {
|
||||||
|
|
Loading…
Reference in a new issue