diff --git a/src/helpers/docs-driver-manual-url.js b/src/helpers/docs-driver-manual-url.js new file mode 100644 index 00000000..ee308b3b --- /dev/null +++ b/src/helpers/docs-driver-manual-url.js @@ -0,0 +1,12 @@ +'use strict' + +module.exports = (page, componentName) => { + let version = page.version + if (version === '3.5') { + version = '1.7' // Driver version 1.7 corresponds to Neo4j version 3.5 + } + if (page.attributes && page.attributes.theme === 'docs' && ['4.1', '4.0', '1.7'].includes(version)) { + return `/docs/driver-manual/${version}` + } + return `/docs/${componentName}/${version}` +} diff --git a/src/helpers/in.js b/src/helpers/in.js new file mode 100644 index 00000000..04c51377 --- /dev/null +++ b/src/helpers/in.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = (value, ...values) => Array.from(values).includes(value) diff --git a/src/partials/header-content.hbs b/src/partials/header-content.hbs index 8a29a327..56f56ebe 100644 --- a/src/partials/header-content.hbs +++ b/src/partials/header-content.hbs @@ -68,7 +68,6 @@ - @@ -111,7 +110,6 @@ {{/if}} - {{!-- {{site.title}} --}}
{{#each this}} - {{#unless ./prerelease }} + {{#unless this.prerelease}} {{./displayVersion}} + {{~#if (eq this.version @root.page.version)}} is-current{{/if~}} + {{~#if this.missing}} is-missing{{/if}}" href="{{{relativize this.url}}}">{{this.displayVersion}} {{/unless}} {{/each}}