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/content/usage/template-repositories.en-us.md
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,14 @@ menu:
17
17
18
18
# Template Repositories
19
19
20
-
Gitea `1.11.0` and above includes template repositories, and one feature implemented with them is auto-expansion of specific variables within your template files.
20
+
Gitea (starting with version `1.11.0`) supports creating template repositories
21
+
which can be used to generate repositories based on the template, complete with
22
+
variable expansion of certain pre-defined variables.
21
23
22
-
To tell Gitea which files to expand, you must include a `template` file inside the `.gitea` directory of the template repository.
24
+
All files in the template repository are included in a generated repository from the
25
+
template except for the `.gitea/template` file. The `.gitea/template` file tells
26
+
Gitea which files are subject to the variable expansion when creating a
27
+
repository from the template.
23
28
24
29
Gitea uses [gobwas/glob](https://github.com/gobwas/glob) for its glob syntax. It closely resembles a traditional `.gitignore`, however there may be slight differences.
25
30
@@ -28,7 +33,7 @@ Gitea uses [gobwas/glob](https://github.com/gobwas/glob) for its glob syntax. It
28
33
All paths are relative to the base of the repository
29
34
30
35
```gitignore
31
-
# All .go files, anywhere in the repository
36
+
# Expand all .go files, anywhere in the repository
32
37
**.go
33
38
34
39
# All text files in the text directory
@@ -41,8 +46,6 @@ a/b/c/d.json
41
46
**.[bB][aA][tT]
42
47
```
43
48
44
-
**NOTE:** The `template` file will be removed from the `.gitea` directory when a repository is generated from the template.
45
-
46
49
## Variable Expansion
47
50
48
51
In any file matched by the above globs, certain variables will be expanded.
0 commit comments