> For the complete documentation index, see [llms.txt](https://highfivethemes.gitbook.io/persona-user-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://highfivethemes.gitbook.io/persona-user-documentation/main-templates/archive-all-posts-template.md).

# Archive (All posts) Template

**Persona** has a template for the **Archive (All posts) Page**, which shows all of the posts of your publication. An archive page is not required, but you can add it if you want.

<figure><img src="/files/K7YIUNGakDDP9pZy33TV" alt=""><figcaption><p><strong>Archive (All posts) Page</strong></p></figcaption></figure>

### To add Archive Page:

To add an Archive Page to your publication, you'll need to modify your `routes.yaml` file due to the nature of Ghost's routing system.&#x20;

### **If you've previously modified** **your** `routes.yaml`

**If you've previously modified** your `routes.yaml` file for any reason, you only need to incorporate the following lines to add an **Archive Page** to your publication. This ensures you keep your custom configurations while enabling the archive functionality.

**Here's a quick guide:**

1. Access your Ghost admin area, then navigate to **Settings** > **Labs**.
2. Under the **Labs** section, find and click on the <mark style="color:green;">**Download current routes**</mark> button to upload your current `routes.yaml` file.
3. Open your `routes.yaml` file in a text editor.
4. Add the following lines to your `routes.yaml` file:&#x20;

   ```yaml
   routes:
     /:
       controller: channel
       filter: tag:-hash-case
       template: index
     /archive/:
       controller: channel
       template: archive
       data: page.archive
       filter: tag:-hash-case
     /cases/:
       controller: channel
       template: custom-cases
       data: page.cases
       filter: tag:hash-case
   collections:
     /:
       permalink: /{slug}/
       template: index
   taxonomies:
     tag: /tag/{slug}/
     author: /author/{slug}/
   ```
5. Save your changes and re-upload the `routes.yaml` file through the same **Labs** section by clicking **Upload routes file** button.
6. After completing these steps, you need to [**add an Archive Page**](#adding-an-archive-page)**.**

### **If you have not previously modified** your `routes.yaml` <a href="#if-you-have-not-previously-modified-your-routes.yaml" id="if-you-have-not-previously-modified-your-routes.yaml"></a>

**This guide is intended for users who have not previously modified** their `routes.yaml` file. If you have already made changes to your `routes.yaml` file, please check [**this guide**](https://app.gitbook.com/o/82hWF68fXP20g6RXlRpu/s/wvffoSogkWPRht0dQCRD/main-templates/archive-all-posts-template#if-youve-previously-modified-your-routes.yaml).

**Here's a quick guide:**

* Access your Ghost admin area, then navigate to **Settings** > **Labs**.
* Under the **Labs** section, find and click on the <mark style="color:green;">**Download current routes**</mark> button for the `routes.yaml` file to make a backup.
* Download this `routes.yaml`

{% file src="/files/UbUCUkfJxIEC94dNPizz" %}

{% hint style="info" %}
In case if you can't download our file, here is how your `routes.yaml` should look like:

```
routes:
  /:
    controller: channel
    filter: tag:-hash-case
    template: index
  /archive/:
    controller: channel
    template: archive
    data: page.archive
    filter: tag:-hash-case
  /cases/:
    controller: channel
    template: custom-cases
    data: page.cases
    filter: tag:hash-case
collections:
  /:
    permalink: /{slug}/
    template: index
taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/
```

{% endhint %}

* Upload new `routes.yaml` file through the same **Labs** section by clicking **Upload routes file** button.
* After completing these steps, you need to [**add an Archive Page**](#adding-an-archive-page)**.**

### Adding an Archive Page: <a href="#adding-an-archive-page" id="adding-an-archive-page"></a>

1. In your Ghost admin area, go to **Pages** and click on the **New Page** button in the top right corner.
2. Title your page. You can choose any title you like for the **Archive Page**.
3. Click <img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwvffoSogkWPRht0dQCRD%2Fuploads%2FMe62hAJzByne8YkmhI5n%2F01.png?alt=media&#x26;token=b6e00f70-f0e4-4c3c-bede-ec8d21603049" alt="" data-size="line"> icon in the top right corner to open the **Page settings.**
4. In the **Page** **URL** section, ensure the slug is set to `archive`. This links the page to the route you've set up in your `routes.yaml` file.
5. **Optionally**, you can add an excerpt and feature an image to make the page more engaging.
6. Once you're done, click on **Publish** to make your **Archive Page** live.

This page will now follow the Archive template and functionality as defined in your routes.yaml file.


---

# 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://highfivethemes.gitbook.io/persona-user-documentation/main-templates/archive-all-posts-template.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.
