An include is a file that can be included in another file.
When referenced in another file, Jekyll will insert the include’s contents into the source file when the site is built. This allows you to single-source content - that is, use a single file in multiple places.
In this guide, you’ll learn how to identify and locate includes in the Stitch docs repository.
Step 1: Identifying an include
Identifying an include is pretty simple. You’ll know you’re looking at one when you see something like the following:
{% include text.html %}
Step 2: Finding the include file
All include files have their file path included. Below is a common include found in database integration docs:
- title: "Add {{ integration.display_name }} as a Stitch data source"
anchor: "add-stitch-data-source"
content: |
{% include shared/database-connection-settings.html type="general" %}
Every include is located in the _includes
folder. The text following include
is the file path, or the location of the include file. So, in the example above, the include is in _includes/shared/database-connection-settings.html
.
Back to top
Last updated: 28 July 2021