Select the types of activity you want to include in your feed.
Support parsing templates recursively
Templates can now be specified as a relative path under 'templates'. For example, a template at 'templates/foo/bar.html' can simply be referenced as 'foo/bar.html' for loading.
···5566INSTALLING
7788- go get git.icyphox.sh/vite
88+ go install git.icyphox.sh/vite@latest
9910101111USAGE
···4141TEMPLATING
42424343Non-index templates have access to the below objects:
4444-· Cfg: object of ConfigYaml
4545-· Meta: map[string]string of the page's frontmatter metadata
4646-· Body: Contains the HTML
4444+• Cfg: object of ConfigYaml
4545+• Meta: map[string]string of the page's frontmatter metadata
4646+• Body: Contains the HTML
47474848Index templates have access to everything above, and a Posts object,
4949which is a slice containing HTML and Meta. This is useful for iterating
5050through to generate an index page.
5151Example: https://git.icyphox.sh/site/tree/templates/index.html
52525353+Templates are written as standard Go templates (ref:
5454+https://godocs.io/text/template), and can be loaded recursively.
5555+Consider the below template structure:
5656+5757+ templates/
5858+ |-- blog.html
5959+ |-- index.html
6060+ |-- project/
6161+ |-- index.html
6262+ `-- project.html
6363+6464+The templates under 'project/' are referenced as 'project/index.html'.
6565+This deserves mention because Go templates don't recurse into
6666+subdirectories by default (template.ParseGlob uses filepath.Glob, and
6767+doesn't support deep-matching, i.e. '**').
6868+5369More templating examples can be found at:
5470https://git.icyphox.sh/site/tree/templates
5571···6379FILE TREE
64806581 .
6666- ├── build/
6767- ├── config.yaml
6868- ├── pages/
6969- ├── static/
7070- └── templates/
8282+ |-- build/
8383+ |-- config.yaml
8484+ |-- pages/
8585+ |-- static/
8686+ |-- templates/
71877288The entire 'static/' directory gets copied over to 'build/', and can be
7389used to reference static assets -- css, images, etc. 'pages/' supports