# Section

The Section type represents a folder within your `content` folder.

## Properties

| Name | Description
| --- | --- |
| `absolutePath` | Absolute path of the page on disk (not portable). |
| `basename` | Basename of the section folder. |
| `description` | Section description. |
| `dir` | Section relative directory. |
| `indexable` | Returns true if a section is indexable. If a section is marked as *not* indexable, none of its pages won't be indexable as well. |
| `keywords` | Page keywords (*Array*), shortcut to `metadata.keywords`. |
| `meta` | Alias for `metadata` |
| `metadata` | Page metadata (*Object*) parsed from front-matter block. |
| `nextSection` | Next section in documents tree (*Section*). |
| `pages` | All the pages beloging to the section. For multilingual sites, be careful as original and translations are mixed. Prefer using the getPagesByLanguage() method instead. |
| `path` | Relative path to the section. Example: `my-section`. |
| `previousSection` | Previous section in documents tree (*Section*). |
| `slug` | Section slug. Will return the `metadata.slug` if it exists, or `basename`. |
| `tags` | Section tags (*Array*), shortcut to `metadata.tags`. |
| `title` | Section title. |
| `type` | Section type, taken from its metadata. If none is specified, *"default"* is returned. |
| `url` | Section url, which is in fact, the URL of the first page in the section. |
| `weight` | Section weight, used for ordering in lists. |


## Methods

| Name | Description
| --- | --- |
| `getFirstPage(lang = null): Page` | Get the first page in section. For multilingual sites, you can specify the language. |
| `getLastPage(lang = null): Page` | Get the last page in section. For multilingual sites, you can specify the language. |
| `getPreviousPage(sameSection = true): Page` | Get the previous page in section, or in the previous section if `sameSection` equals `false`. |
| `hasIndex(): Boolean` | Check if the section has an index page (something like index.md, index.fr.md, etc). |
| `hasSubSections(): Boolean` | Returns `true` if the section has sub-sections. |
| `getPagesByLanguage(lang, bestEffort = false): Page[]` | Get all the pages for a language. If `bestEffort` is set to `true`, it returns the pages in the given language when a such version exists, otherwise the version of the site default language. |


