Home

blog @5ae23f6ccfdfa3979cbedb102bc7e11f4bec6a89 - refs - log -
-
https://git.jolheiser.com/blog.git
My nonexistent blog
blog / _example / README.md
- raw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Example blog structure

The `articles` dir contains a list of articles, namely this one.

The `templates` dir contains a handful of [go templates](https://pkg.go.dev/html/template) that make up how to render the blog.
- `article.tmpl` is a template for an individual article (this page).
- `index.tmpl` is the main blog overview.
- `base.tmpl` is a collection of [defined blocks](https://pkg.go.dev/text/template#hdr-Nested_template_definitions)
that are then re-used in `index.tmpl` and `article.tmpl` to create a cohesive look-and-feel.

Finally, `config.yaml` (which can also be TOML if desired) allows you to not have to continuously re-type all the flags to define things like your 
`--article-dir`, `--template-dir`, or `--out`.