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