Skip to content

Commit 04e88e6

Browse files
Rephrase template documentation to be more clear about .gitea/template (#27450)
Closes #27336 --------- Co-authored-by: silverwind <[email protected]>
1 parent 13d5d2e commit 04e88e6

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

docs/content/usage/template-repositories.en-us.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@ menu:
1717

1818
# Template Repositories
1919

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.
2123

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.
2328

2429
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.
2530

@@ -28,7 +33,7 @@ Gitea uses [gobwas/glob](https://github.com/gobwas/glob) for its glob syntax. It
2833
All paths are relative to the base of the repository
2934

3035
```gitignore
31-
# All .go files, anywhere in the repository
36+
# Expand all .go files, anywhere in the repository
3237
**.go
3338
3439
# All text files in the text directory
@@ -41,8 +46,6 @@ a/b/c/d.json
4146
**.[bB][aA][tT]
4247
```
4348

44-
**NOTE:** The `template` file will be removed from the `.gitea` directory when a repository is generated from the template.
45-
4649
## Variable Expansion
4750

4851
In any file matched by the above globs, certain variables will be expanded.

0 commit comments

Comments
 (0)