useDuxtVersion()
What the switcher shows, what the banner says, whether to index.
Signature
const version = useDuxtVersion();
Returns
| Value | What it answers |
|---|---|
sources | Every version of the repository being read |
current | The version this page belongs to |
preferred | The version a reader should be on |
isPreferred | Whether those two are the same |
status | Its lifecycle — upcoming, current, eol … |
kind | Branch or tag |
shouldIndex | Whether the page asks to be indexed |
shouldWarn | Whether the banner shows |
preferredPath | This same page, in the preferred version |
Notes
Three questions from one place — what the switcher shows, what the banner says, and whether the page asks to be indexed — because they are the same question about the same version.
Was this page helpful?