Closed IsraelOrtuno closed 4 months ago
Not sure if I want to have it in the header though 🤔
What do you think @benjamincanac ?
I'm not sure either where to put this but maybe we could use a badge to display it? Like https://ui.nuxt.com/dev/getting-started
Badge like Nuxt UI could be nice.
I would also avoid having the patch version (ex: v3.11
)
Badge like Nuxt UI could be nice.
I would also avoid having the patch version (ex:
v3.11
)
We could add the patch version on a tooltip on hover. Will update the PR with the badge soon.
Way cleaner with badge and tooltip:
Thanks @IsraelOrtuno !
I updated the Nuxt API to return the version: https://api.nuxt.com/stats
This way we can directly use useStats()
.
I simplified your code and merging now!
Didn't know about useStats
composable, way cleaner!
This little PR adds the current Nuxt version right to the header. I find this really useful as docs are visited very often by devs of any level and this is really useful to discover patch releases.
Despite I have tried to design it as soft as possible (but readable) I am aware this may be a little bit intrusive. Open to any feedback from the design team and maybe put it in a tooltip (show only on hover) or maybe somewhere else (docs sidebar sounds right too).
It also exposes a
/api/release.json
endpoint which returns the latest version and maybe some other useful meta information in the future.