Skip to content
duxt

useDuxtVersion()

What the switcher shows, what the banner says, whether to index.

Signature

const version = useDuxtVersion();

Returns

ValueWhat it answers
sourcesEvery version of the repository being read
currentThe version this page belongs to
preferredThe version a reader should be on
isPreferredWhether those two are the same
statusIts lifecycle — upcoming, current, eol …
kindBranch or tag
shouldIndexWhether the page asks to be indexed
shouldWarnWhether the banner shows
preferredPathThis 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?