Home

tmpl @main - refs - log -
-
https://git.jolheiser.com/tmpl.git
Template automation
tree log patch
Explain .tmplkeep (#17) Co-authored-by: jolheiser <john.olheiser@gmail.com> Reviewed-on: https://gitea.com/jolheiser/tmpl/pulls/17 Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-committed-by: John Olheiser <john.olheiser@gmail.com>
John Olheiser <john.olheiser@gmail.com>
3 years ago
3 changed files, 17 additions(+), 1 deletions(-)
I .gitea/pull_request_template.md
diff --git a/.gitea/pull_request_template.md b/.gitea/pull_request_template.md
new file mode 100644
index 0000000000000000000000000000000000000000..f4def42693c59d57f7ae7cb57941329dc4b71aa8
--- /dev/null
+++ b/.gitea/pull_request_template.md
@@ -0,0 +1,6 @@
+<!-- 
+1. Did you add documentation?
+2. Did you add tests?
+3. Do you need to re-run formatting?
+4. Do you need to re-run docs.go?
+-->
\ No newline at end of file
M DOCS.md -> DOCS.md
diff --git a/DOCS.md b/DOCS.md
index 638b13b29ee46ace88a0eb32b943fab675c2473e..7a3f2b916fc8ba8f3e51685c5c34c4ec46fffcc9 100644
--- a/DOCS.md
+++ b/DOCS.md
@@ -119,3 +120,13 @@ 1. The simplest solution is to make a copy of your `registry.toml` (default: `~/.tmpl/registry.toml`).
    * Once in the new location, you will need to use `tmpl restore`.
    
 ## template.toml
+# tmpl templates
+
+## `.tmplkeep`
+
+Perhaps you are familiar with `.gitkeep` and its unofficial status in git. Git does not like empty directories, so usually
+a `.gitkeep` (or just `.keep`) file is added to retain the directory while keeping it effectively empty.
+
+tmpl instead uses `.tmplkeep` files for this purpose. The difference is, tmpl will **not** create the `.tmplkeep` file
+when the template is executed. This allows you to set up directory structures (for staging, examples, etc.) that
+will *actually* be empty after execution.
\ No newline at end of file
M docs.go -> docs.go
diff --git a/docs.go b/docs.go
index 3ca29f5fce836dde5d89ab9a045b34941d50cbcf..aa13bf6048df5e6ed3f858f08bf725a73cf48505 100644
--- a/docs.go
+++ b/docs.go
@@ -29,7 +29,7 @@ 	md = md[strings.Index(md, "#"):]
 
 	// CLI is using real default instead of DefaultText
 
-// +build docs
+import (
 
 	if _, err := fi.WriteString(md); err != nil {
 		panic(err)