{"meta":{"title":"Creating reusable content","intro":"You can create reusable content that can be referenced in multiple content files.","product":"Contribute to GitHub Docs","breadcrumbs":[{"href":"/en/enterprise-cloud@latest/contributing","title":"Contribute to GitHub Docs"},{"href":"/en/enterprise-cloud@latest/contributing/writing-for-github-docs","title":"Writing for GitHub Docs"},{"href":"/en/enterprise-cloud@latest/contributing/writing-for-github-docs/creating-reusable-content","title":"Create reusable content"}],"documentType":"article"},"body":"# Creating reusable content\n\nYou can create reusable content that can be referenced in multiple content files.\n\n## About reusables\n\nReusables are long strings of reusable text, such as paragraphs or procedural lists, that can be referenced in multiple content files.\n\nWe use Markdown (instead of YAML) for reusables. Markdown 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.\n\nEach reusable lives in its own Markdown file.\n\nThe 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.\n\nReusable 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 %}`.\n\n### Applying versioning to reusables\n\nReusables can include Liquid conditionals to conditionally render content depending on the current version being viewed. <!-- For more information, see [AUTOTITLE](/contributing/writing-for-github-docs/using-markdown-and-liquid-in-github-docs). -->\n\n## About variables\n\nVariables are short strings of reusable text.\n\nWe use YAML files for variables.\n\nThe path, filename, and keys within each YAML file determine what its path will be in the data object.\n\nFor example, this YAML file, `data/variables/foo/bar.yml`, contains two variables:\n\n```yaml\n# the YAML file can contain multiple short strings in one file\nmeaning_of_life: 42\n\n# the strings can also be nested if needed\nnested:\n  values:\n    too: Yes!\n```\n\nThe values would be accessible as `{% data foo.bar.meaning_of_life %}` and `{% data foo.bar.nested.values.too %}`."}