Skip to content

Commit

Permalink
Add a stale version warning + a link to the latest version of docs (#…
Browse files Browse the repository at this point in the history
…10446)

* Add a stale version warning + a link to the latest version of docs

* Update docs/.vuepress/config.js

Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com>

* Shorten the warning

* Revert master title

* Revert master title

Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com>
  • Loading branch information
igorlukanin and LeeLenaleee authored Jul 18, 2022
1 parent 59a2d53 commit 1ccafe7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ module.exports = {
['@simonbrunel/vuepress-plugin-versions', {
filters: {
suffix: (tag) => tag ? ` (${tag})` : '',
title: (v, vars) => window.location.href.includes('master') ? 'Development (master)' : v + (vars.tag ? ` (${tag})` : ''),
title: (v, vars) => {
return window.location.href.includes('master') ? 'Development (master)' :
vars.tag === 'latest' ? 'Latest (' + v + ')' :
v + (vars.tag ? ` (${tag})` : '') + ' (outdated)';
},
},
menu: {
text: '{{version|title}}',
Expand All @@ -57,6 +61,10 @@ module.exports = {
text: 'Development (master)',
link: '/docs/master/',
},
{
text: 'Latest version',
link: '/docs/latest/',
},
{
type: 'versions',
text: '{{version}}{{tag|suffix}}',
Expand Down

0 comments on commit 1ccafe7

Please sign in to comment.