Skip to content

Files

Latest commit

96a4aa5 · Nov 27, 2023

History

History
This branch is 9490 commits behind github/docs:main.

reusables

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Nov 27, 2023
Nov 27, 2023
May 12, 2023
Nov 8, 2023
Jul 26, 2022
Oct 31, 2023
Oct 10, 2023
Oct 6, 2023
Jun 22, 2023
Nov 13, 2023
Sep 13, 2023
Nov 6, 2023
Oct 13, 2023
Nov 27, 2023
Jun 23, 2023
Jun 26, 2023
Oct 25, 2023
Sep 25, 2023
Oct 19, 2023
Nov 14, 2023
Mar 24, 2023
Nov 14, 2023
Jun 21, 2023
Sep 22, 2023
Sep 8, 2023
Nov 27, 2023
Feb 15, 2023
Oct 25, 2023
Feb 15, 2023
Oct 27, 2023
Sep 12, 2023
Oct 24, 2023
Nov 21, 2023
Feb 15, 2023
Nov 8, 2023
Oct 15, 2023
Nov 27, 2023
Nov 22, 2023
Sep 22, 2023
Aug 29, 2023
Mar 7, 2023
Nov 27, 2023
Sep 26, 2023
Oct 27, 2023
Sep 12, 2023
Nov 8, 2023
Jun 21, 2023
Oct 25, 2023
Mar 27, 2023
Nov 9, 2023
Jun 19, 2023
Sep 25, 2023
Jun 24, 2021
Sep 29, 2023
Mar 20, 2023
Jun 21, 2023
Nov 13, 2023
Sep 22, 2023
Nov 13, 2020
Sep 25, 2023
Sep 26, 2023
Sep 27, 2020
Sep 22, 2023
Oct 13, 2023
Mar 29, 2022
Jun 23, 2023
Nov 27, 2023
Jun 6, 2022
Nov 16, 2023
Oct 25, 2023
Nov 13, 2023
Sep 22, 2023
Oct 26, 2023
Jul 18, 2023
Jul 28, 2023
Oct 25, 2023
Nov 13, 2023
Oct 16, 2023
Sep 22, 2023
Nov 8, 2023
Nov 15, 2023
Jun 28, 2023
Jun 23, 2023
Nov 15, 2023
Nov 10, 2023
Sep 22, 2023
Nov 8, 2023
Nov 13, 2023
Nov 8, 2023
Nov 22, 2023
Nov 17, 2023
Sep 22, 2023
Jun 26, 2023
Jul 11, 2023
Nov 1, 2023
Oct 10, 2023
Sep 21, 2023
Jun 23, 2023
Nov 13, 2023
Nov 8, 2023
Jun 23, 2023
Sep 22, 2023
Nov 27, 2023
Oct 25, 2022
Oct 11, 2023
Sep 25, 2023

Reusables

Reusables are long strings of reusable text.

Reusables are longer strings like paragraphs or procedural lists that can be referenced in multiple content files. Using Markdown (instead of YAML) makes it possible for our localization pipeline to split the strings into smaller translatable segments, leading to fewer translation errors and less churn when the source English content changes.

Each reusable lives in its own Markdown file.

The path and filename of each Markdown file determines what its path will be in the data object.

For example, a file named /data/reusables/foo/bar.md will be accessible as {% data reusables.foo.bar %} in pages.

Reusable files are divided generally into directories by task. For example, if you're creating a reusable string for articles about GitHub notifications, you'd add it in the directory data/reusables/notifications/ in a file named data/reusables/notifications/your-reusable-name.md. The content reference you'd add to the source would look like {% data reusables.notifications.your-reusable-name %}.

Indenting

Indented reusables require a special liquid tag: indented_data_reference which also requires the number of spaces to indent as an argument.

For example, to indent /data/reusables/foo/bar.md in an ordered list, you could:

1. My first list item
{% indented_data_reference reusables.foo.par spaces=2 %}
1. My second list item

Versioning

Reusables can include Liquid conditionals to conditionally render content depending on the current version being viewed. See contributing/liquid-helpers.md.