fork of anirudh.fi/vite that uses chroma for hl
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Custom syntax highlighting

+70 -7
-1
config.go
··· 16 16 Prebuild []string `yaml:"prebuild"` 17 17 Postbuild []string `yaml:"postbuild"` 18 18 RSSPrefixURL string `yaml:"rssprefixurl"` 19 - Syntax string `yaml:"syntax"` 20 19 } 21 20 22 21 func parseConfig() Config {
+4 -3
go.mod
··· 4 4 5 5 require ( 6 6 github.com/Depado/bfchroma v1.3.0 7 - github.com/adrg/frontmatter v0.1.0 7 + github.com/adrg/frontmatter v0.2.0 8 + github.com/alecthomas/chroma v0.9.2 // indirect 8 9 github.com/cross-cpm/go-shutil v0.0.0-20190908093542-3fcbb1a2151e 9 10 github.com/gorilla/feeds v1.1.1 10 11 github.com/kr/pretty v0.2.1 // indirect 11 - github.com/russross/blackfriday/v2 v2.0.1 12 - gopkg.in/yaml.v2 v2.3.0 12 + github.com/russross/blackfriday/v2 v2.1.0 13 + gopkg.in/yaml.v2 v2.4.0 13 14 )
+10
go.sum
··· 4 4 github.com/Depado/bfchroma v1.3.0/go.mod h1:c0bFk0tFmT+clD3TIGurjWCfD/QV8/EebfM3JGr+98M= 5 5 github.com/adrg/frontmatter v0.1.0 h1:8gYVjU1CRsoc6in25uKQVpcQpR9cYz2BD0NQk6JepyU= 6 6 github.com/adrg/frontmatter v0.1.0/go.mod h1:93rQCj3z3ZlwyxxpQioRKC1wDLto4aXHrbqIsnH9wmE= 7 + github.com/adrg/frontmatter v0.2.0 h1:/DgnNe82o03riBd1S+ZDjd43wAmC6W35q67NHeLkPd4= 8 + github.com/adrg/frontmatter v0.2.0/go.mod h1:93rQCj3z3ZlwyxxpQioRKC1wDLto4aXHrbqIsnH9wmE= 7 9 github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= 8 10 github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= 9 11 github.com/alecthomas/chroma v0.7.3 h1:NfdAERMy+esYQs8OXk0I868/qDxxCEo7FMz1WIqMAeI= 10 12 github.com/alecthomas/chroma v0.7.3/go.mod h1:sko8vR34/90zvl5QdcUdvzL3J8NKjAUx9va9jPuFNoM= 13 + github.com/alecthomas/chroma v0.9.2 h1:yU1sE2+TZbLIQPMk30SolL2Hn53SR/Pv750f7qZ/XMs= 14 + github.com/alecthomas/chroma v0.9.2/go.mod h1:eMuEnpA18XbG/WhOWtCzJHS7WqEtDAI+HxdwoW0nVSk= 11 15 github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 h1:JHZL0hZKJ1VENNfmXvHbgYlbUOvpzYzvy2aZU5gXVeo= 12 16 github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= 13 17 github.com/alecthomas/kong v0.2.4/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq+lElKxE= ··· 23 27 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 24 28 github.com/dlclark/regexp2 v1.2.0 h1:8sAhBGEM0dRWogWqWyQeIJnxjWO6oIjl8FKqREDsGfk= 25 29 github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= 30 + github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E= 31 + github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= 26 32 github.com/gorilla/feeds v1.1.1 h1:HwKXxqzcRNg9to+BbvJog4+f3s/xzvtZXICcQGutYfY= 27 33 github.com/gorilla/feeds v1.1.1/go.mod h1:Nk0jZrvPFZX1OBe5NPiddPw7CfwF6Q9eqzaBbaightA= 28 34 github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= ··· 39 45 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 40 46 github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= 41 47 github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 48 + github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= 49 + github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 42 50 github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= 43 51 github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= 44 52 github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= ··· 56 64 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 57 65 gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= 58 66 gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 67 + gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 68 + gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 59 69 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= 60 70 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+1 -1
markdown.go
··· 16 16 input, 17 17 bf.WithRenderer( 18 18 bfc.NewRenderer( 19 - bfc.Style(cfg.Syntax), 19 + bfc.ChromaStyle(Icy), 20 20 bfc.Extend( 21 21 bf.NewHTMLRenderer(bf.HTMLRendererParameters{ 22 22 Flags: bfFlags,
+5 -2
readme
··· 3 3 4 4 A fast (this time, actually) and minimal static site generator. 5 5 6 + NOTE: At this point, a lot of this code is heavily tailored towards my 7 + own site. 8 + 6 9 7 10 INSTALLING 8 11 9 12 Clone this repository and run 10 - 13 + 11 14 $ make 12 15 # make install 13 16 ··· 50 53 Prebuild []string `yaml:"prebuild"` 51 54 Postbuild []string `yaml:"postbuild"` 52 55 RSSPrefixURL string `yaml:"rssprefixurl"` 53 - } 56 + } 54 57 55 58 // Fm 56 59 struct {
+50
style.go
··· 1 + package main 2 + 3 + import ( 4 + "github.com/alecthomas/chroma" 5 + ) 6 + 7 + var Icy = chroma.MustNewStyle("icy", chroma.StyleEntries{ 8 + chroma.CommentMultiline: "italic #999988", 9 + chroma.CommentPreproc: "bold #999999", 10 + chroma.CommentSingle: "italic #999988", 11 + chroma.CommentSpecial: "bold italic #999999", 12 + chroma.Comment: "italic #999988", 13 + chroma.Error: "bg:#e3d2d2 #a61717", 14 + chroma.GenericDeleted: "bg:#ffdddd #000000", 15 + chroma.GenericEmph: "italic #000000", 16 + chroma.GenericError: "#aa0000", 17 + chroma.GenericHeading: "#999999", 18 + chroma.GenericInserted: "bg:#ddffdd #000000", 19 + chroma.GenericOutput: "#888888", 20 + chroma.GenericPrompt: "#555555", 21 + chroma.GenericStrong: "bold", 22 + chroma.GenericSubheading: "#aaaaaa", 23 + chroma.GenericTraceback: "#aa0000", 24 + chroma.GenericUnderline: "underline", 25 + chroma.KeywordType: "bold #222222", 26 + chroma.Keyword: "bold #000000", 27 + chroma.LiteralNumber: "#009999", 28 + chroma.LiteralStringRegex: "#009926", 29 + chroma.LiteralStringSymbol: "#990073", 30 + chroma.LiteralString: "#509c93", 31 + chroma.NameAttribute: "#008080", 32 + chroma.NameBuiltinPseudo: "#999999", 33 + chroma.NameBuiltin: "#0086B3", 34 + chroma.NameClass: "bold #666666", 35 + chroma.NameConstant: "#008080", 36 + chroma.NameDecorator: "bold #3c5d5d", 37 + chroma.NameEntity: "#800080", 38 + chroma.NameException: "bold #444444", 39 + chroma.NameFunction: "bold #444444", 40 + chroma.NameLabel: "bold #444444", 41 + chroma.NameNamespace: "#555555", 42 + chroma.NameTag: "#000080", 43 + chroma.NameVariableClass: "#008080", 44 + chroma.NameVariableGlobal: "#008080", 45 + chroma.NameVariableInstance: "#008080", 46 + chroma.NameVariable: "#008080", 47 + chroma.Operator: "bold #000000", 48 + chroma.TextWhitespace: "#bbbbbb", 49 + chroma.Background: " bg:#ffffff", 50 + })