# ember-page-title

> Page Titles for Ember applications

Latest version **9.1.0** (published 2026-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-page-title
pnpm add ember-page-title
yarn add ember-page-title
bun add ember-page-title
```

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 9.1.0 |
| Published | 2026-11-07 |
| First published | 2015-08-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 57.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 186 |
| Author | Tim Evans |
| Maintainers | ef4, katiegengler, melsumner |
| Keywords | ember-addon, page title, title, component, fastboot |

## Links

- npm: https://www.npmjs.com/package/ember-page-title
- Repository: https://github.com/ember-cli/ember-page-title
- Homepage: https://ember-cli.github.io/ember-page-title
- Issues: https://github.com/ember-cli/ember-page-title/issues
- npm.io page: https://npm.io/package/ember-page-title

## Dependencies (2)

- [@simple-dom/document](https://npm.io/package/@simple-dom/document.md) ^1.4.0
- [@embroider/addon-shim](https://npm.io/package/@embroider/addon-shim.md) ^1.8.7

## Recent versions

- 9.1.0 (latest) — 2026-11-07
- 8.0.0-beta.1 (beta) — 2023-08-16
- 9.0.3 — 2025-08-22
- 9.0.2 — 2025-05-15
- 9.0.1 — 2025-02-22
- 9.0.0 — 2025-02-22
- 8.2.4 — 2025-02-18
- 8.2.3 — 2024-03-12
- 8.2.2 — 2024-02-15
- 8.2.1 — 2024-01-23
- 8.2.0 — 2024-01-08
- 8.1.0 — 2023-10-31
- 8.0.0 — 2023-08-16
- 8.0.0-beta.0 — 2022-02-02
- 7.0.0 — 2021-10-28
- … 46 more at https://npm.io/package/ember-page-title/versions

## README

## ember-page-title [![Ember Observer Score](https://emberobserver.com/badges/ember-page-title.svg)](https://emberobserver.com/addons/ember-page-title) ![CI](https://github.com/ember-cli/ember-page-title/workflows/CI/badge.svg)

This addon provides a helper for changing the title of the page you're on.

### Installing via ember-cli

```bash
ember install ember-page-title
```

### Compatibility

- `ember-source` v4.2 or above

<details>
<summary>Fastboot vs Non-Fastboot Notes</summary>

#### Post Install Setup Notes

As of v3.0.0 this addon maintains the page title by using the `<title>` tag in your document's `<head>`. This is necessary for [FastBoot](https://github.com/tildeio/ember-cli-fastboot) compatibility.

**Non-fastboot apps** should keep the `<title>` tag in index.html to ensure that the initial page is valid HTML. The title will be removed and replaced when your app boots.

**Fastboot apps** MUST remove the `<title>` tag from index.html. As of v6.0.0 this is done automatically if you use `ember install ember-page-title` to install this addon. Can also be run manually using `ember g ember-page-title` to update the title if FastBoot is installed.

</details>

### Digging in

[Visit the Docs site](https://ember-cli.github.io/ember-page-title/)

### API

#### `{{page-title}}` Helper

| attribute | type    | default  | description                                                                   |
| --------- | :------ | :------- | :---------------------------------------------------------------------------- |
| separator | string  | `" \| "` | Which separator should be displayed _after_ this instance of `{{page-title}}` |
| prepend   | boolean | true     | If the token should be prepended or appended to the list of tokens            |
| replace   | boolean | false    | Replace all previous elements with the active                                 |
| front     | boolean | false    | If the token should always be in the beginning of the resulting title.        |

The default values for `separator`, `prepend` and `replace` are configurable via `config/environment.js`:

```javascript
// config/environment.js

module.exports = function (environment) {
  let ENV = {
    pageTitle: {
      replace: true,
    },
  };

  return ENV;
};
```

For usage in `gts` and `gjs`, the `pageTitle` helper is exported from the index:

```gjs
import { pageTitle } from 'ember-page-title';

<template>
  {{pageTitle "About"}}
  
  ...
</template>
```

### `page-title` Service

If you want to be notified when the page title has been updated, you can extend and override the `page-title` service and provide your own `titleDidUpdate` hook. The `titleDidUpdate` hook receives the new title as its sole argument.

```javascript
// app/services/page-title.js

import EmberPageTitleService from 'ember-page-title/services/page-title';

export default class PageTitleService extends EmberPageTitleService {
  titleDidUpdate(title) {
    // Do something with the new title.
  }
}
```

### Testing

`assert` the page `title` with the supplied `getPageTitle` test helper:

```javascript
import { getPageTitle } from 'ember-page-title/test-support';

module('Acceptance | Register Page', function (hooks) {
  setupApplicationTest(hooks);

  test('visiting /register', async function (assert) {
    const registerURL = '/register';
    await visit(registerURL);

    assert.equal(currentURL(), registerURL);
    assert.equal(getPageTitle(), 'Register | Some Website');
  });
});
```

### TypeScript and Glint v2

There is nothing to configure as only gjs/gts is supported

### TypeScript and Glint

If your project uses loose-mode templates, you can merge in the template registry interface provided by ember-page-title, 
```ts
// <your-app>/types/glint.d.ts
import '@glint/environment-ember-loose';
import '@glint/environment-ember-template-imports';

import type PageTitle from 'ember-page-title/template-registry';

declare module '@glint/environment-ember-loose/registry' {
	export default interface Registry extends PageTitle {
        /* your local loose-mode entries here */
	}
}
```

Similarly, if you rely on a service registry, you'll want to import ember-page-title's service registry and extend from it.

```ts
import type PageTitle from 'ember-page-title/service-registry';

declare module '@ember/service' {
  interface Registry extends PageTitle {
        /* your local service entries here */
  }
}
```

or, if you wish to manage how the service becomes registered yourself, you may import the service:
```ts
import type PageTitle from 'ember-page-title/services/page-title';
```

### Upgrading notes for 5.x to 6.x

- `ember-page-title` no longer requires the usage of `ember-cli-head`.
  Please remove `{{head-layout}}` from your application's `application.hbs` route template.
- `{{title}}` has been removed, please rename to `{{page-title}}`.

# Contributing

Contributors are welcome! Please provide a reproducible test case. Details will be worked out on a case-per-case basis. Maintainers will get in touch when they can, so delays are possible. For contribution guidelines, see the [code of conduct](https://github.com/ember-cli/ember-page-title/blob/master/CODE_OF_CONDUCT.md).

### Publishing Documentation

To publish documentation, run the following command:

```bash
ember github-pages:commit --message "update documentation"
git push origin gh-pages:gh-pages
```

---
_Source: https://npm.io/package/ember-page-title · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
