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 |
vite ---- A fast (this time, actually) and minimal static site generator. INSTALLING go get git.icyphox.sh/vite USAGE 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 CONFIG The configuration is unmarshalled from a config.yaml file, into the below struct: type ConfigYaml struct { Title string `yaml:"title"` Desc string `yaml:"description"` Author struct { Name string `yaml:"name"` Email string `yaml:"email"` } `yaml:"author"` URL string `yaml:"url"` } Example config: https://git.icyphox.sh/site/tree/config.yaml TEMPLATING Non-index templates have access to the below objects: · Cfg: object of ConfigYaml · Meta: map[string]string of the page's frontmatter metadata · Body: Contains the HTML Index templates have access to everything above, and a Posts object, which is a slice containing HTML and Meta. This is useful for iterating through to generate an index page. Example: https://git.icyphox.sh/site/tree/templates/index.html More templating examples can be found at: https://git.icyphox.sh/site/tree/templates FILE TREE . ├── build/ ├── config.yaml ├── pages/ ├── static/ └── templates/ The entire 'static/' directory gets copied over to 'build/', and can be used to reference static assets -- css, images, etc. 'pages/' supports only nesting one directory deep; for example: 'pages/blog/*.md' will render, but 'pages/blog/foo/*.md' will not. |