# Pages

The Page type represents a document within your `content` folder.

## Properties

| Name | Description
| --- | --- |
| `absolutePath` | Absolute path of the page on disk (not portable). |
| `basename` | Basename of the page, including language and extension. Example: `my-page.fr.md`. |
| `basenameWithoutLang` | Basename of the page, excluding language and extension. Example: `my-page`. |
| `createdAt` | Creation date (Moment.js object). |
| `description` | Page description. |
| `dir` | Page relative directory. |
| `draft` | Draft status. `true` is page is a draft. Shortcut to `metadata.draft` |
| `headings` | Array of headings, shortcut to `metadata.headings`. |
| `htmlPath` | For a markdown file, this is where the corresponding html file will be written. |
| `indexable` | Returns true if a page is indexable. Based on the metadata flag `noindex`. |
| `keywords` | Page keywords (*Array*), shortcut to `metadata.keywords`. |
| `language` | Page language (ISO 2 letters) taken from either `metadata.language` or file extension |
| `destPath` | For a markdown file, this property equals `.htmlPath` otherwise, this is the destination file path that will be written. |
| `markdown` | Page markdown contents, without the front-matter block. |
| `metadata` | Page metadata (*Object*) parsed from front-matter block. |
| `path` | Relative path to the file. Example: `my-section/mypage.fr.md`. |
| `pathWithoutLang` | Relative path of the page without lang or extension. Example: `my-section/mypage`. |
| `searchableText` | Searchable page content. Primarily used by the integrated search engine. Generated from the html contents stripped from tags. |
| `section` | Page section (instance of Section) |
| `slug` | Page slug. Will return the `metadata.slug` if it exists, or `basenameWithoutLang`. |
| `tags` | Page tags (*Array*), shortcut to `metadata.tags`. |
| `title` | Page title. |
| `translations` | Page translations. (`Page[]`) |
| `type` | Page type, taken from its metadaata or the parent section. If none is specified, *"default"* is returned. |
| `updatedAt` | Last update date (Moment.js object). |
| `url` | Page url. |
| `weight` | Page weight, used for ordering in lists. |


## Methods

| Name | Description
| --- | --- |
| `getNextPage(sameSection = true): Page` | Get the next page in section, or in the next section if `sameSection`equals `false`. |
| `getPreviousPage(sameSection = true): Page` | Get the previous page in section, or in the previous section if `sameSection`equals `false`. |
| `hasTranslationInto(lang: String): Boolean` | Check if a translation into language `lang` exists. |
| `isDefaultLanguage(): Boolean` | Check if the page is written in the default language specified in config (default: "en"). |
| `isIndex(): Boolean` | Check if the page is an index page (index.md, index.fr.md, etc). |
| `isTranslationOf(otherPage: Page): Boolean` | Check if the page is a translation of another. |


