# Sitemaps

## How can I symlink the sitemaps directory every deploy?

For sitemaps, we recommend you create a directory called shared and symlink it every deploy so that you can keep a copy of your sitemaps across every deploy.

Add the following to the top of your app's Deploy Script:

```
ln -s $DIR/shared/public/shared $RELEASE_DIR/public/shared
```

You'll need to manually create this directory on your server with the following command:

```
mkdir -p ~/appname/shared/public/shared
```

If you're using SitemapGenerator, you can use the following options to make sure they matched the folder we just created in our deploy script.

```
# Shared directory so all deployments will have the sitemap
SitemapGenerator::Sitemap.sitemaps_path = 'shared/'

SitemapGenerator::Sitemap.create do
  group(sitemaps_path: 'shared/sitemaps', filename: 'general-pages') do
  end
end
```


---

# Agent Instructions: 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://hatchbox.gitbook.io/hatchbox/apps/sitemaps.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.
