Skip to content

Commit

Permalink
[astro-pages.mdx] add example for internal page links (#4610)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarah11918 authored Sep 9, 2023
1 parent b3857d5 commit cf79740
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/content/docs/en/core-concepts/astro-pages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ A single file can also generate multiple pages using [dynamic routing](/en/core-

### Link between pages

Write standard HTML [`<a>` elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) in your Astro pages to link to other pages on your site.
Write standard HTML [`<a>` elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) in your Astro pages to link to other pages on your site. Use a **URL path relative to your root domain** as your link, not a relative file path.

For example, to link to `https://example.com/authors/sonali/` from any other page on `example.com`:

```astro title="src/pages/index.astro"
Read more <a href="/authors/sonali/">about Sonali</a>.
```

## Astro Pages

Expand Down

0 comments on commit cf79740

Please sign in to comment.