You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/content/docs/creating-templates/index.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ Hello, Alice!
53
53
54
54
That's a template. You just made one.
55
55
56
-
The `template/` directory contains your project files. Files ending in `.tera` are rendered through the Tera template engine, then have the `.tera` suffix stripped. Everything else is copied as-is.
56
+
The `template/` directory contains your project files. Files ending in `.tera` are rendered through the [Tera template engine](https://keats.github.io/tera/), then have the `.tera` suffix stripped. Everything else is copied as-is.
`ci_provider` is only prompted when `use_ci` is true. The `when` field takes a Tera expression.
147
+
`ci_provider` is only prompted when `use_ci` is true. The `when` field takes a [Tera expression](https://keats.github.io/tera/docs/#expressions).
148
148
149
149
## Conditional files
150
150
@@ -211,7 +211,7 @@ Files matching these patterns are copied verbatim. Tera syntax inside them is le
211
211
212
212
## Tera template basics
213
213
214
-
Five things you'll actually use.
214
+
Five things you'll actually use. See the [Tera documentation](https://keats.github.io/tera/) for complete reference.
215
215
216
216
### Variables
217
217
@@ -251,7 +251,7 @@ Transform values inline:
251
251
{{ description | truncate(length=50) }}
252
252
```
253
253
254
-
`slugify` turns "My Project" into "my-project". `upper` uppercases. `truncate` cuts to length.
254
+
`slugify` turns "My Project" into "my-project". `upper` uppercases. `truncate` cuts to length. See all [built-in filters](https://keats.github.io/tera/docs/#built-in-filters).
Copy file name to clipboardExpand all lines: docs/src/content/docs/getting-started/index.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ license = "MIT"
67
67
68
68
## What just happened?
69
69
70
-
diecut cloned the template repo, navigated to the `rust-cli` subdirectory, read the `diecut.toml` config, prompted you for variables, and rendered every `.tera` file through the Tera template engine. The `.tera` suffix was stripped from output filenames. Files without `.tera` were copied as-is. Your answers were saved to `.diecut-answers.toml`.
70
+
diecut cloned the template repo, navigated to the `rust-cli` subdirectory, read the `diecut.toml` config, prompted you for variables, and rendered every `.tera` file through the [Tera template engine](https://keats.github.io/tera/). The `.tera` suffix was stripped from output filenames. Files without `.tera` were copied as-is. Your answers were saved to `.diecut-answers.toml`.
Copy file name to clipboardExpand all lines: docs/src/content/docs/index.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,11 +49,11 @@ That's it. diecut prompts you for variables and generates a ready-to-go project.
49
49
50
50
## Why diecut?
51
51
52
-
I built diecut because I tend to make lots of projects for fun. I get a stack I like, and I don't like messing around with the setup. I enjoyed cookiecutter back in the day, but I found it complicating my life more than simplifying it.
52
+
I built diecut because I tend to make lots of projects for fun. I get a stack I like, and I don't like messing around with the setup. I enjoyed cookiecutter back in the day, but I found it complicating my life more than simplifying it.
53
53
54
54
I aimed to solve four things:
55
55
56
-
-**Single binary**: I've often just wanted to download a binary and no faff with Python stuff, even though I wrote mostly Python.
57
-
-**Easy to make**: I wanted it to be dead simple to make templates with as few footguns as possible.
58
-
-**Multi-template repos**: I dabble a lot in different stacks and languages, but I'd rather not have 5 different repos for my templates. This felt like a good way to organize them.
59
-
-**Dry run**: sometimes I want to see what the result will look like before I commit to it.
56
+
-**[Single binary](/getting-started/)**: I've often just wanted to download a binary and no faff with Python stuff, even though I wrote mostly Python.
57
+
-**[Easy to make](/creating-templates/)**: I wanted it to be dead simple to make templates with as few footguns as possible. So you also don't need to do complicated logic in the templates, because you can just chain conditional prompts together to get your answers. You don't even need to use almost any of the Tera templating at all and can just use conditional files feature to exclude files you don't want.
58
+
-**[Multi-template repos](/using-templates/)**: I dabble a lot in different stacks and languages, but I'd rather not have 5 different repos for my templates. This felt like a good way to organize them.
59
+
-**[Safe to try](/reference/commands/)**: sometimes I want to see what the result will look like before I commit to it, but none of the other tools out there had this feature.
Copy file name to clipboardExpand all lines: docs/src/content/docs/reference/diecut-toml.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ file = ".diecut-answers.toml"
68
68
69
69
Template metadata. Only `name` is required.
70
70
71
-
-**`templates_suffix`** -- Change from `.tera` to something else if you prefer (e.g., `.j2`, `.tmpl`). Files matching this suffix are rendered through the Tera engine; others are copied as-is.
71
+
-**`templates_suffix`** -- Change from `.tera` to something else if you prefer (e.g., `.j2`, `.tmpl`). Files matching this suffix are rendered through the [Tera](https://keats.github.io/tera/) engine; others are copied as-is.
72
72
-**`min_diecut_version`** -- If set, diecut will refuse to process the template if the installed version is too old.
73
73
74
74
## [variables]
@@ -78,8 +78,8 @@ Variables are prompted in declaration order. Each variable is a TOML table under
78
78
Key behaviors:
79
79
80
80
-`select` and `multiselect` require `choices` to be set.
81
-
-`computed` variables must **not** have a `prompt`. They are derived from other variables using Tera expressions.
82
-
-`when` controls conditional prompting. Uses Tera expression syntax (e.g., `"{{ use_ci }}"` or just `"use_ci"`).
81
+
-`computed` variables must **not** have a `prompt`. They are derived from other variables using [Tera expressions](https://keats.github.io/tera/docs/#expressions).
82
+
-`when` controls conditional prompting. Uses [Tera expression](https://keats.github.io/tera/docs/#expressions) syntax (e.g., `"{{ use_ci }}"` or just `"use_ci"`).
83
83
-`validation` is a regex pattern. The entire input must match (anchored).
84
84
-`secret` variables are prompted but excluded from `.diecut-answers.toml`.
85
85
- Variables are available in templates as `{{ variable_name }}`.
Control which files are included and how they're processed.
114
114
115
115
-**`exclude`** -- Glob patterns. Matched files are not written to output. Useful for build artifacts, OS files.
116
-
-**`copy_without_render`** -- Glob patterns. Matched files skip Tera rendering and are copied verbatim. Use for binaries, images, or files that contain `{{ }}` syntax that isn't meant for Tera.
116
+
-**`copy_without_render`** -- Glob patterns. Matched files skip [Tera](https://keats.github.io/tera/) rendering and are copied verbatim. Use for binaries, images, or files that contain `{{ }}` syntax that isn't meant for Tera.
117
117
-**`conditional`** -- Array of `{ pattern, when }` objects. Files matching `pattern` are included only when `when` evaluates to true.
0 commit comments