# Create a new collection

A collection is like a folder that contains a group of pages. A page is like a file in your Github repository.

{% hint style="info" %}
**A collection can only exist when there is a page inside. So you must create a page in a collection.**
{% endhint %}

![On Github, a collection is a folder](https://13808351-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MAS5zzRwr-f8BQR34DD%2F-MP54eROe9NJpoaK_97F%2F-MP5Bz0MO7EFygR5wzfg%2FScreenshot%202020-12-22%20at%2012.48.28%20AM.png?alt=media\&token=bf21486b-5e73-46a8-aa22-02ad7a7f3ab6)

**Step 1** Create a file, which will represent a page on your site.&#x20;

![](https://13808351-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MAS5zzRwr-f8BQR34DD%2F-MP54eROe9NJpoaK_97F%2F-MP5CI_vieOxqRgER1s5%2FScreenshot%202020-12-22%20at%2012.49.36%20AM.png?alt=media\&token=e301faef-7618-483b-969d-551f4603f178)

**Step 2** Specify the folder name

{% hint style="success" %}
A folder for a collection should always **start with underscore (\_).** **Replace spaces between words with dashes (-)**.&#x20;

Always keep **all file and folder names in** **small caps**
{% endhint %}

![](https://13808351-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MAS5zzRwr-f8BQR34DD%2F-MP54eROe9NJpoaK_97F%2F-MP5EkG04aIX_cCFzVtI%2Fcreate-folder.gif?alt=media\&token=9111369b-ec35-4450-a721-aca07eb6af2e)

**Step 3** Add a forward slash to fix the folder name and set a file name.&#x20;

A file name usually corresponds to your page name for easy reference.

&#x20;&#x20;

![By typing the forward slash, you're fixing the file path of the folder](https://13808351-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MAS5zzRwr-f8BQR34DD%2F-MP54eROe9NJpoaK_97F%2F-MP5EuyLWRCiYS5ZEnE-%2Fcreate-folder-filename.gif?alt=media\&token=92bbf7fb-0b5d-4526-b304-d45beccf67e6)

**Step 4** Specify the title and permalink of the page&#x20;

### Things to note:

1. You should enclose the title and permalink inside three dashes `---`
2. Permalink **should not** have any spaces in between.
3. If you're creating a page inside a collection, you should specify in the permalink that the page is inside the folder. For example, for a page named `My page` inside a folder called `My New Folder`, the permalink will look like this `/my-new-folder/my-page/`

```
---
title: New Page
permalink: /my-new-folder/my-page/ 
---
```

**Step 5** Scroll to the bottom and click commit at the bottom of the page to save the file.&#x20;
