* Highly extensible
* Works well for blogs and generic static websites (landing pages etc)
* Easy to learn
+* Code highlighting with [bfchroma](https://github.com/Depado/bfchroma)
* Fast (duh!)
## Installation
-// $TheSupernovaDuo: cmd/aya/main.go,v 0.5.x 2023/5/7 10:57:10 yakumo_izuru Exp $
+// $TheSupernovaDuo: cmd/aya/main.go,v 0.5.x 2023/5/8 18:6:18 yakumo_izuru Exp $
package main
import (
log "github.com/sirupsen/logrus"
"github.com/eknkc/amber"
"github.com/yosssi/gcss"
+ "github.com/Depado/bfchroma/v2"
)
const (
if err != nil {
return err
}
- v["content"] = string(blackfriday.Run(
- []byte(content),
- blackfriday.WithExtensions(blackfriday.CommonExtensions|blackfriday.AutoHeadingIDs),
+ v["content"] = string(blackfriday.Run([]byte(content),
+ blackfriday.WithExtensions(blackfriday.CommonExtensions|blackfriday.AutoHeadingIDs),blackfriday.WithRenderer(bfchroma.NewRenderer()),
))
if w == nil {
out, err := os.Create(filepath.Join(PUBDIR, renameExt(path, "", ".html")))
go 1.17
require (
+ github.com/Depado/bfchroma/v2 v2.0.0
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385
github.com/russross/blackfriday/v2 v2.1.0
github.com/sirupsen/logrus v1.9.0
gopkg.in/yaml.v2 v2.4.0
)
-require golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
+require (
+ github.com/alecthomas/chroma/v2 v2.2.0 // indirect
+ github.com/dlclark/regexp2 v1.4.0 // indirect
+ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
+)
+github.com/Depado/bfchroma/v2 v2.0.0 h1:IRpN9BPkNwEpR6w1ectIcNWOuhDSLx+8f1pn83fzxx8=
+github.com/Depado/bfchroma/v2 v2.0.0/go.mod h1:wFwW/Pw8Tnd0irzgO9Zxtxgzp3aPS8qBWlyadxujxmw=
+github.com/alecthomas/chroma/v2 v2.2.0 h1:Aten8jfQwUqEdadVFFjNyjx7HTexhKP0XuqBG67mRDY=
+github.com/alecthomas/chroma/v2 v2.2.0/go.mod h1:vf4zrexSH54oEjJ7EdB65tGNHmH3pGZmVkgTP5RHvAs=
+github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae h1:zzGwJfFlFGD94CyyYwCJeSuD32Gj9GTaSi5y9hoVzdY=
+github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
+github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o=
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=