···11go-vite
22-------
3344-vite, but in Go.
44+A fast (this time, actually) and minimal static site generator.
5566-Works with vite projects. You will have to rework Jinja2 templates to Go
77-templates. Look at my site[1] for an example.
8697INSTALLING
108···15131614Requires `go` to be installed, obviously.
17151616+1817USAGE
19182019 vite [options]
···2625 build builds the current project
2726 new PATH create a new markdown post
28272929-NOTES
2828+2929+CONFIGURATION
3030+3131+vite expects a config.yaml file to exist in the project root. You can
3232+refer https://git.icyphox.sh/site/tree/config.yaml for an example
3333+containing all possible keys.
3434+3535+3636+TEMPLATING
3737+3838+vite uses Go templating[2], and exposes two structure instances for
3939+rendering stuff in your template: `Cfg` and `Fm`, defined like so:
4040+4141+ // Cfg
4242+ struct {
4343+ Title string `yaml:"title"`
4444+ Header string `yaml:"header"`
4545+ DateFmt string `yaml:"datefmt"`
4646+ SiteURL string `yaml:"siteurl"`
4747+ Description string `yaml:"description"`
4848+ Author map[string]string `yaml:"author"`
4949+ Footer string `yaml:"footer"`
5050+ Prebuild []string `yaml:"prebuild"`
5151+ Postbuild []string `yaml:"postbuild"`
5252+ RSSPrefixURL string `yaml:"rssprefixurl"`
5353+ }
5454+5555+ // Fm
5656+ struct {
5757+ Template string
5858+ URL string
5959+ Title string
6060+ Subtitle string
6161+ Date string
6262+ Body string
6363+ }
6464+6565+For an example, refer https://git.icyphox.sh/site/tree/templates
6666+6767+6868+FEEDS
30693170vite generates Atom feeds for all documents under the `pages/blog/`
3232-directory.
7171+directory. I plan to add generation for arbitrary directories, with
7272+ability to configure the feed file name (defaults to feed.xml right
7373+now).
33743475[1]: https://github.com/icyphox/site
7676+[2]: https://golang.org/pkg/html/template/