> For the complete documentation index, see [llms.txt](https://greene-lab.gitbook.io/lab-website-template-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://greene-lab.gitbook.io/lab-website-template-docs/advanced/data-and-collections.md).

# Data and collections

Jekyll provides two main ways to create and maintain large lists/sets of items: **data** and **collections**.&#x20;

The template comes with [a few placeholder data lists for common needs](/lab-website-template-docs/basics/repo-structure.md#data-and-components), but if you need to create more/different ones, here's how.

{% hint style="info" %}
This page just explains how to make these lists. To actually display them on your site, use the [list component](/lab-website-template-docs/basics/components/list.md).
{% endhint %}

## **Data**

If you want to have a large set of structured or nested items in a single file, use a [data file](https://jekyllrb.com/docs/datafiles/).

Put a `.yaml` file in the `/_data` folder with any name, and fill it with data. The structure of the data can be arbitrary.

Example:

{% code title="/\_data/some-list.yaml" %}

```yaml
# some item
- title: Some name
  tags:
    - tag A
    - tag B
  description: Some description

# another item
...
```

{% endcode %}

## **Collections**

If you want to have a large set of items in separate files that can also generate their own separate pages on your site, use [collections](https://jekyllrb.com/docs/collections).&#x20;

Put `.md` files in a folder prefixed with a `_`, and fill their [front matters](/lab-website-template-docs/basics/edit-pages.md#edit-page-details) with data. To generate a separate page for each item in the collection, set `output: true` in your config file [as described here](https://jekyllrb.com/docs/collections).

Example:

{% code title="/\_some-list/some-file.md" %}

```markdown
---
title: Some name
tags:
  - tag A
  - tag B
description: Some description
---

Some Markdown content
```

{% endcode %}

{% code title="/\_some-list/another-file.md" %}

```markdown
---
title: Another name
---

Some Markdown content
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://greene-lab.gitbook.io/lab-website-template-docs/advanced/data-and-collections.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
