fork of anirudh.fi/vite that uses chroma for hl
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update readme

+40 -50
+40 -50
readme
··· 1 - go-vite 2 - ------- 1 + vite 2 + ---- 3 3 4 4 A fast (this time, actually) and minimal static site generator. 5 5 6 - NOTE: At this point, a lot of this code is heavily tailored towards my 7 - own site. 8 - 9 - 10 6 INSTALLING 11 7 12 - Clone this repository and run 13 - 14 - $ make 15 - # make install 16 - 17 - Requires `go` to be installed, obviously. 8 + go get git.icyphox.sh/vite 18 9 19 10 20 11 USAGE 21 12 22 - vite [options] 13 + usage: vite [options] 23 14 24 15 A simple and minimal static site generator. 25 16 ··· 29 20 new PATH create a new markdown post 30 21 31 22 32 - CONFIGURATION 23 + CONFIG 33 24 34 - vite expects a config.yaml file to exist in the project root. You can 35 - refer https://git.icyphox.sh/site/tree/config.yaml for an example 36 - containing all possible keys. 25 + The configuration is unmarshalled from a config.yaml file, into the 26 + below struct: 37 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 + } 38 37 39 - TEMPLATING 38 + Example config: https://git.icyphox.sh/site/tree/config.yaml 40 39 41 - vite uses Go templating[2], and exposes two structure instances for 42 - rendering stuff in your template: `Cfg` and `Fm`, defined like so: 43 40 44 - // Cfg 45 - struct { 46 - Title string `yaml:"title"` 47 - Header string `yaml:"header"` 48 - DateFmt string `yaml:"datefmt"` 49 - SiteURL string `yaml:"siteurl"` 50 - Description string `yaml:"description"` 51 - Author map[string]string `yaml:"author"` 52 - Footer string `yaml:"footer"` 53 - Prebuild []string `yaml:"prebuild"` 54 - Postbuild []string `yaml:"postbuild"` 55 - RSSPrefixURL string `yaml:"rssprefixurl"` 56 - } 41 + TEMPLATING 57 42 58 - // Fm 59 - struct { 60 - Template string 61 - URL string 62 - Title string 63 - Subtitle string 64 - Date string 65 - Body string 66 - } 43 + Non-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 + 48 + Index templates have access to everything above, and a Posts object, 49 + which is a slice containing HTML and Meta. This is useful for iterating 50 + through to generate an index page. 51 + Example: https://git.icyphox.sh/site/tree/templates/index.html 67 52 68 - For an example, refer https://git.icyphox.sh/site/tree/templates 53 + More templating examples can be found at: 54 + https://git.icyphox.sh/site/tree/templates 69 55 70 56 71 - FEEDS 57 + FILE TREE 72 58 73 - vite generates Atom feeds for all documents under the `pages/blog/` 74 - directory. I plan to add generation for arbitrary directories, with 75 - ability to configure the feed file name (defaults to feed.xml right 76 - now). 59 + . 60 + ├── build/ 61 + ├── config.yaml 62 + ├── pages/ 63 + ├── static/ 64 + └── templates/ 77 65 78 - [1]: https://github.com/icyphox/site 79 - [2]: https://golang.org/pkg/html/template/ 66 + The entire 'static/' directory gets copied over to 'build/', and can be 67 + used to reference static assets -- css, images, etc. 'pages/' supports 68 + only nesting one directory deep; for example: 'pages/blog/*.md' will 69 + render, but 'pages/blog/foo/*.md' will not.