all repos — vite @ e0dc7bd326a18d8004efd5b706b941b2265ad64b

a fast (this time, actually) and minimal static site generator

readme (view raw)

 1vite
 2----
 3
 4A fast (this time, actually) and minimal static site generator.
 5
 6INSTALLING
 7
 8    go get git.icyphox.sh/vite
 9
10
11USAGE
12
13    usage: vite [options]
14
15    A simple and minimal static site generator.
16
17    options:
18        init PATH       create vite project at PATH
19        build           builds the current project
20        new PATH        create a new markdown post
21
22
23CONFIG
24
25The configuration is unmarshalled from a config.yaml file, into the
26below struct:
27
28    type ConfigYaml struct {
29        Title  string `yaml:"title"`
30        Desc   string `yaml:"description"`
31        Author struct {
32            Name  string `yaml:"name"`
33            Email string `yaml:"email"`
34        } `yaml:"author"`
35        URL string `yaml:"url"`
36    }
37
38Example config: https://git.icyphox.sh/site/tree/config.yaml
39
40
41TEMPLATING
42
43Non-index templates have access to the below objects:
44· Cfg: object of ConfigYaml
45· Meta: map[string]string of the page's frontmatter metadata
46· Body: Contains the HTML
47
48Index templates have access to everything above, and a Posts object,
49which is a slice containing HTML and Meta. This is useful for iterating
50through to generate an index page.
51Example: https://git.icyphox.sh/site/tree/templates/index.html
52
53More templating examples can be found at:
54https://git.icyphox.sh/site/tree/templates
55
56
57FEEDS
58
59Atom feeds are generated for all directories under 'pages/'. So
60'pages/foo' will have a Atom feed at 'build/foo/feed.xml'.
61
62
63FILE TREE
64
65    .
66    ├── build/
67    ├── config.yaml
68    ├── pages/
69    ├── static/
70    └── templates/
71
72The entire 'static/' directory gets copied over to 'build/', and can be
73used to reference static assets -- css, images, etc. 'pages/' supports
74only nesting one directory deep; for example: 'pages/blog/*.md' will
75render, but 'pages/blog/foo/*.md' will not.