Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-08 21:09:49 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-08 21:09:49 +0300
commit89b770bb38aef8c0b895454e940d8f55a3038527 (patch)
tree83d0d7966b207747091f7ba6d892184f1e33bbcb /doc/api/repositories.md
parent3bc30c280c408f3f31c90961e0fc5809c6246137 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/repositories.md')
-rw-r--r--doc/api/repositories.md38
1 files changed, 36 insertions, 2 deletions
diff --git a/doc/api/repositories.md b/doc/api/repositories.md
index 6bbd4c56e40..25237c33383 100644
--- a/doc/api/repositories.md
+++ b/doc/api/repositories.md
@@ -5,7 +5,7 @@ info: "To determine the technical writer assigned to the Stage/Group associated
type: reference, api
---
-# Repositories API **(CORE)**
+# Repositories API **(FREE)**
## List repository tree
@@ -410,6 +410,7 @@ follows:
- [{{ title }}]({{ commit.reference }})\
{% if author.contributor %} by {{ author.reference }}{% end %}\
{% if merge_request %} ([merge request]({{ merge_request.reference }})){% end %}
+
{% end %}
{% end %}
@@ -457,11 +458,40 @@ If a line ends in a backslash, the next newline is ignored. This allows you to
wrap code across multiple lines, without introducing unnecessary newlines in the
Markdown output.
+Tags that use `{%` and `%}` (known as expression tags) consume the newline that
+directly follows them, if any. This means that this:
+
+```plaintext
+---
+{% if foo %}
+bar
+{% end %}
+---
+```
+
+Compiles into this:
+
+```plaintext
+---
+bar
+---
+```
+
+Instead of this:
+
+```plaintext
+---
+
+bar
+
+---
+```
+
You can specify a custom template in your configuration like so:
```yaml
---
-template: >
+template: |
{% if categories %}
{% each categories %}
### {{ title }}
@@ -469,6 +499,7 @@ template: >
{% each entries %}
- [{{ title }}]({{ commit.reference }})\
{% if author.contributor %} by {{ author.reference }}{% end %}
+
{% end %}
{% end %}
@@ -477,6 +508,9 @@ template: >
{% end %}
```
+Note that when specifying the template you should use `template: |` and not
+`template: >`, as the latter doesn't preserve newlines in the template.
+
### Template data
At the top level, the following variable is available: