nuxt-x-affiliate
Post Navigation
Previous / next links at the foot of an article or review.
Post Navigation
Previous / next links at the foot of an article or review.
Accepts either a slug (joined onto basePath) or a full path, so it works with a
hand-rolled content list or with Nuxt Content's path field.
Components
<XAFPostNavigation />
<XAFPostNavigation
:previous="{ title: 'How we test grinders', slug: 'how-we-test-grinders' }"
:next="{ title: 'Best pour-over kettles of 2026', slug: 'best-pour-over-kettles' }"
base-path="/reviews"
/>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
previous | { title, slug?, path? } | — | The older post. Omit at the start of a series |
next | { title, slug?, path? } | — | The newer post. Omit at the end |
basePath | string | '/blog' | Prefix joined to slug when a post has no path |
previousLabel | string | 'Previous' | Label above the previous title |
nextLabel | string | 'Next' | Label above the next title |
Tips
pathwins overslugwhen both are present.- Trailing slashes on
basePathand leading slashes onslugare both tolerated — you won't get/blog//my-post. - The links carry
rel="prev"/rel="next". With only one neighbour, an empty column keepsnextright-aligned.
AI Context
component: XAFPostNavigation
package: "@xenterprises/nuxt-x-affiliate"
use-when: Previous/next links at the foot of an article or review
