fast and minimal static site generator
ssg
6
fork

Configure Feed

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

Go 89.8%
Makefile 0.7%
Other 9.5%
51 1 0

Clone this repository

https://tangled.org/anirudh.fi/vite https://tangled.org/did:plc:hwevmowznbiukdf6uk5dwrrq/vite
git@tangled.org:anirudh.fi/vite git@tangled.org:did:plc:hwevmowznbiukdf6uk5dwrrq/vite

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
readme
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


FEEDS

Atom feeds are generated for all directories under 'pages/'. So
'pages/foo' will have a Atom feed at 'build/foo/feed.xml'.


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.