readme (view raw)
1go-vite
2-------
3
4A fast (this time, actually) and minimal static site generator.
5
6
7INSTALLING
8
9Clone this repository and run
10
11 $ make
12 # make install
13
14Requires `go` to be installed, obviously.
15
16
17USAGE
18
19 vite [options]
20
21 A simple and minimal static site generator.
22
23 options:
24 init PATH create vite project at PATH
25 build builds the current project
26 new PATH create a new markdown post
27
28
29CONFIGURATION
30
31vite expects a config.yaml file to exist in the project root. You can
32refer https://git.icyphox.sh/site/tree/config.yaml for an example
33containing all possible keys.
34
35
36TEMPLATING
37
38vite uses Go templating[2], and exposes two structure instances for
39rendering stuff in your template: `Cfg` and `Fm`, defined like so:
40
41 // Cfg
42 struct {
43 Title string `yaml:"title"`
44 Header string `yaml:"header"`
45 DateFmt string `yaml:"datefmt"`
46 SiteURL string `yaml:"siteurl"`
47 Description string `yaml:"description"`
48 Author map[string]string `yaml:"author"`
49 Footer string `yaml:"footer"`
50 Prebuild []string `yaml:"prebuild"`
51 Postbuild []string `yaml:"postbuild"`
52 RSSPrefixURL string `yaml:"rssprefixurl"`
53 }
54
55 // Fm
56 struct {
57 Template string
58 URL string
59 Title string
60 Subtitle string
61 Date string
62 Body string
63 }
64
65For an example, refer https://git.icyphox.sh/site/tree/templates
66
67
68FEEDS
69
70vite generates Atom feeds for all documents under the `pages/blog/`
71directory. I plan to add generation for arbitrary directories, with
72ability to configure the feed file name (defaults to feed.xml right
73now).
74
75[1]: https://github.com/icyphox/site
76[2]: https://golang.org/pkg/html/template/