Skip to content

Commit

Permalink
Fix aliases documentation and incorporate more feedback from 'Brunch …
Browse files Browse the repository at this point in the history
…and learn' session on the topic (#396)
  • Loading branch information
jdbaldry authored Dec 12, 2023
1 parent 7981c35 commit d8a403d
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions docs/sources/write/front-matter/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,23 +96,27 @@ To determine the relative alias, you must first understand the meaning of the cu

For an alias in the page `/docs/grafana/latest/alerting/manage-notifications/`:

- The current directory element (`.`) refers to the directory containing the current page.
- The current directory element (`.`) refers to the directory containing the current page, _not_ the directory of the current page.

In this example, this is the page `/docs/grafana/latest/alerting/manage-notifications/`.
In this example, this is the page `/docs/grafana/latest/alerting/`.

- The parent directory element (`..`) refers to the parent directory of the current directory element.

In this example, this is the page `/docs/grafana/latest/alerting/`.
In this example, this is the page `/docs/grafana/latest/`.

In the following table:

The following table demonstrates the redirect URL, **REDIRECT**, created when using the relative alias, **RELATIVE ALIAS**, in the source file for **DESTINATION**:
- **FROM PAGE**: is the page that requires a redirect, for example because the page has been moved or no longer exists.
- **TO PAGE**: is the page where readers are redirected to, for example the renamed page or where the content has been moved.
- **RELATIVE ALIAS**: is the alias that must be added to the front matter of the file for **TO PAGE** to create the proper redirect.

| DESTINATION | RELATIVE ALIAS | REDIRECT |
| ----------------------------------------------------- | ---------------------------------------- | -------------------------------------------------------------------- |
| `/docs/grafana/latest/alerting/manage-notifications/` | `./` | `/docs/grafana/latest/alerting/` |
| `/docs/grafana/latest/alerting/manage-notifications/` | `./silences/` | `/docs/grafana/latest/alerting/silences/` |
| `/docs/grafana/latest/alerting/manage-notifications/` | `./manage-notifications/create-silence/` | `/docs/grafana/latest/alerting/manage-notifications/create-silence/` |
| `/docs/grafana/latest/alerting/manage-notifications/` | `../` | `/docs/grafana/latest/` |
| `/docs/grafana/latest/alerting/manage-notifications/` | `../old-alerting/` | `/docs/grafana/latest/old-alerting/` |
| FROM PAGE | TO PAGE | RELATIVE ALIAS |
| -------------------------------------------------------------------- | ----------------------------------------------------- | ---------------------------------------- |
| `/docs/grafana/latest/alerting/` | `/docs/grafana/latest/alerting/manage-notifications/` | `./` |
| `/docs/grafana/latest/alerting/silences/` | `/docs/grafana/latest/alerting/manage-notifications/` | `./silences/` |
| `/docs/grafana/latest/alerting/manage-notifications/create-silence/` | `/docs/grafana/latest/alerting/manage-notifications/` | `./manage-notifications/create-silence/` |
| `/docs/grafana/latest/` | `/docs/grafana/latest/alerting/manage-notifications/` | `../` |
| `/docs/grafana/latest/old-alerting/` | `/docs/grafana/latest/alerting/manage-notifications/` | `../old-alerting/` |

#### Other projects

Expand Down

0 comments on commit d8a403d

Please sign in to comment.