> For the complete documentation index, see [llms.txt](https://docs.beae.dev/beae-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.beae.dev/beae-docs/developer/theme-library.md).

# Theme library

## What is Theme library?

Theme library help the theme author can build their templates, sections, etc. That help improve the theme more flexible

## How to build a theme library

#### 5 step to build a theme library

1. Install [beae app](https://apps.shopify.com/beae/install) on Shopify store
2. Start build the first page or section
3. Export your page or section as file ( Save as file at top bar)
4. Create **beae.json** in **assets** folder in theme with structure below
5. Upload your export files to **assets** folder

{% code title="beae.json" %}

```json
{
  "author": "Kalles",
  "logo": "https://cdn.shopify.com/s/files/1/0332/6420/5963/files/kalles.svg",
  "website": "https://your-site.com?utm_source=beae",
  "library": {
    "categories": [
        {
          "id": "landing",
          "title": "Landing"
        },
        {
          "id": "home",
          "title": "Home"
        }
    ],

    "pages": [
      {
        "title": "The first page",
        "thumbnail": "CqpElqxn3v.jpg",
        //You also add the link. Eg: "thumbnail": "https://domain.com/folder/CqpElqxn3v.jpg",
        "categories": [
          "home"
        ]
        "source": "MyTemplate.beae" 
        // Your export file from Beae Page Builder
        //Add your export file to assets folder
        // You also can add the link instead. Eg: "source": "https://domain.com/folder/MyTemplate.beae"
      
      },
      ...// More pages below
    ],
    "sections": [
      {
        "title": "The first section",
        "thumbnail": "https://dev.beae.com/storage/elements-public/posts/pages/thumbnails/1011/2021/11/17/CqpElqxn3v.jpg",
        "source": "MySection.beae",
         // Your export file from Beae Page Builder
         //Add your export file to assets folder
         // You also can add the link instead. Eg: "source": "https://domain.com/folder/MySection.beae"
        
        "categories": [
          "landing",
          "home"
        ]
      },
      ... //More sections below
    ]
  }
}
```

{% 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:

```
GET https://docs.beae.dev/beae-docs/developer/theme-library.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
