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: lib/liquid-tags/README.md
+1-38Lines changed: 1 addition & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,6 @@ See also [contributing/liquid-helpers.md](../../contributing/liquid-helpers.md)
5
5
This directory contains custom Liquid tags for outputting dynamic content. These custom tags exist for a few reasons:
6
6
7
7
- Content and styling should be separated. Writers should not be concerned with writing or maintaining stylistic markup.
8
-
- Writers should be able to create links by specifying the minimum amount of identifying information (an article href) and leave it to the site to dynamically inject that page's metadata like `title`, `intro`, etc.
9
8
- Content should be localized to match the current language.
10
9
- Styling and markup should be DRY and reusable.
11
10
@@ -19,49 +18,13 @@ Tags can be used in:
19
18
Tags always expect a single argument, a language agnostic href:
<h4class="link-with-intro-title">Getting started with GitHub Desktop<spanclass="Bump-link-symbol">→</span></h4>
42
-
</a>
43
-
<pclass="link-with-intro-intro">Get GitHub Desktop set up to manage your project work. Authenticate to GitHub.com or GitHub Enterprise Server, keep the app up-to-date, and review your preferred settings.</p>
<h4class="link-with-intro-title">Comenzar con GitHub Desktop<spanclass="Bump-link-symbol">→</span></h4></a>
51
-
<pclass="link-with-intro-intro">Configura GitHub Desktop para administrar tu proyecto de trabajo. Autentícate en GitHub.com o en el Servidor de GitHub Enterprise, mantén la app actualizada y revisa tu configuración preferida.</p>
52
-
```
53
-
54
-
Note that link tags will only render links that are available in the current page version (i.e. GitHub.com vs Enterprise), so it's not necessary to add Liquid conditionals around them.
55
-
56
24
## Supported tags
57
25
58
26
| Markup | Renders |
59
27
| -- | -- |
60
-
| `{% link /href %}` | The linked page's title, with no special styling.
61
-
| `{% link_with_intro /href %}` | The linked page's title and intro.
62
-
| `{% homepage_link_with_intro /href %}` | The linked page's title and intro, with homepage-specific styling.
63
-
| `{% link_in_list /href %}` | The linked page's title in a list item.
64
-
| `{% topic_link_in_list /href %}` | The linked map topic's title in a list item (used in category TOCs).
65
28
| `{% indented_data_reference foo.bar spaces=NUMBER %}` | A data reference with the specified number of spaces prepended to each line. Defaults to 2 spaces if no spaces included. For example: `{% indented_data_reference reusables.pages.wildcard-dns-warning spaces=3 %}`
0 commit comments