From 3c7a075b2a21adf9afd79e8cc00d48b70e45c061 Mon Sep 17 00:00:00 2001 From: Nicola Vitucci Date: Fri, 9 Feb 2024 15:54:28 +0000 Subject: [PATCH 01/21] Update style for bibliography sections (#212) The default style for `[bibliography]` sections includes bullet points and padding. This change removes both. --- preview-src/bibliography.adoc | 12 ++++++++++++ preview-src/ui-model.yml | 3 +++ src/css/neo4j-docs.css | 5 +++++ 3 files changed, 20 insertions(+) create mode 100644 preview-src/bibliography.adoc diff --git a/preview-src/bibliography.adoc b/preview-src/bibliography.adoc new file mode 100644 index 00000000..8a2b9a88 --- /dev/null +++ b/preview-src/bibliography.adoc @@ -0,0 +1,12 @@ += Use of `bibliography` + +Citations with xreftext: <>, <>. + +Citations without xreftext (ID only): <>. + +[bibliography] +== References + +* [[[Brandes2001, 1]]] Brandes, Ulrik. "A faster algorithm for betweenness centrality." _Journal of mathematical sociology_ 25, no. 2 (2001): 163-177. link:https://snap.stanford.edu/class/cs224w-readings/brandes01centrality.pdf[]. +* [[[Brandes2007, 2]]] Brandes, Ulrik, and Christian Pich. "Centrality estimation in large networks." _International Journal of Bifurcation and Chaos_ 17, no. 07 (2007): 2303-2318. link:https://www.uni-konstanz.de/mmsp/pubsys/publishedFiles/BrPi07.pdf[]. +* [[[Freeman1977]]] Freeman, Linton C. "A set of measures of centrality based on betweenness." _Sociometry_ (1977): 35-41. diff --git a/preview-src/ui-model.yml b/preview-src/ui-model.yml index 8041a596..c3c1d5be 100644 --- a/preview-src/ui-model.yml +++ b/preview-src/ui-model.yml @@ -208,6 +208,9 @@ page: - content: Algorithms url: algorithms.html urlType: internal + - content: Bibliography + url: bibliography.html + urlType: internal - content: Private Page url: private-page.html urlType: internal diff --git a/src/css/neo4j-docs.css b/src/css/neo4j-docs.css index 38054c6e..2ff85fe4 100644 --- a/src/css/neo4j-docs.css +++ b/src/css/neo4j-docs.css @@ -417,3 +417,8 @@ div.beta-symbol p::before { background-color: var(--warning-background-color); color: var(--warning-color); } + +ul.bibliography { + list-style-type: none; + padding-left: 0; +} From a92114e08e2002585d434d101b688ab395eaaf1b Mon Sep 17 00:00:00 2001 From: Stefano Ottolenghi Date: Fri, 9 Feb 2024 17:28:09 +0100 Subject: [PATCH 02/21] Clarify behavior for `` by making cursor pointer. --- src/css/doc.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/css/doc.css b/src/css/doc.css index fb30eac7..81c58daa 100644 --- a/src/css/doc.css +++ b/src/css/doc.css @@ -1291,6 +1291,10 @@ body { margin-bottom: 1.5rem; } +.doc details summary { + cursor: pointer; +} + .doc details[open] summary { font-weight: bold; } From ec1c1f55c39318a22a3d73cd1540c944ef92999c Mon Sep 17 00:00:00 2001 From: Stefano Ottolenghi Date: Mon, 12 Feb 2024 10:37:32 +0100 Subject: [PATCH 03/21] Fix line highlighting not working on last line of code blocks. --- src/js/vendor/highlight.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/vendor/highlight.js b/src/js/vendor/highlight.js index bee0fdff..d9599693 100644 --- a/src/js/vendor/highlight.js +++ b/src/js/vendor/highlight.js @@ -133,7 +133,7 @@ // eat away line breaks or they would be doubled by the div hljs.addPlugin({ 'after:highlightElement': ({ el, result, text }) => { - result.value = result.value.replaceAll(/^(\s*)(.+?)\s*.*?\bmark-line\b.*?<\/span>\n/mg, '
$1$2
') + result.value = result.value.replaceAll(/^(\s*)(.+?)\s*.*?\bmark-line\b.*?<\/span>\n?/mg, '
$1$2
') } }); })() From 620a70915b04e9fa55d7db2d05e1ca84d0cbd43a Mon Sep 17 00:00:00 2001 From: Nicola Vitucci Date: Thu, 15 Feb 2024 09:54:50 +0000 Subject: [PATCH 04/21] Remove pipe from replaced characters in callouts (#213) --- src/js/06-code.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/06-code.js b/src/js/06-code.js index b43e5a40..9e4e0557 100644 --- a/src/js/06-code.js +++ b/src/js/06-code.js @@ -36,7 +36,7 @@ import { createElement } from './modules/dom' })() var cleanCallouts = function (code) { - return code.replace(/[ |\t]+\n/g, '\n').trimEnd() + return code.replace(/[ \t]+\n/g, '\n').trimEnd() } document.addEventListener('DOMContentLoaded', function () { From 0d43844c3633d05444c36cb1754fdbbc1b64639c Mon Sep 17 00:00:00 2001 From: Neil Dewhurst Date: Wed, 28 Feb 2024 11:52:27 +0000 Subject: [PATCH 05/21] switch tabs when id and hash is used (#215) When an ID is set on a block that is part of a tabbed group the tab switching and scroll happens as it does when a user clicks on a tab. --- preview-src/drivers-tabs.adoc | 3 +++ src/js/08-tabs-block.js | 19 +++++++++++++++++++ src/js/12-fragment-jumper.js | 8 ++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/preview-src/drivers-tabs.adoc b/preview-src/drivers-tabs.adoc index 6fcf18eb..fde7e09b 100644 --- a/preview-src/drivers-tabs.adoc +++ b/preview-src/drivers-tabs.adoc @@ -8,10 +8,12 @@ GDS also uses tabs, but they have a different list of tab separators. Rather tha [.tabbed-example] ==== [.include-with-macos] +[[mac-os-bit]] ====== Tab for macOS ====== [.include-with-linux] +[[linux-bit]] ====== Tab for Linux ====== @@ -105,6 +107,7 @@ Note that this requires that Go modules are enabled. ====== [.include-with-java] +[[java-bit]] ====== To use the Java driver, it is recommended employing a dependency manager, such as Maven or Gradle. diff --git a/src/js/08-tabs-block.js b/src/js/08-tabs-block.js index 5cbf5d34..252167e6 100644 --- a/src/js/08-tabs-block.js +++ b/src/js/08-tabs-block.js @@ -205,4 +205,23 @@ document.addEventListener('DOMContentLoaded', function () { parent.removeChild(originalTab) }) + + // + // Make active tab based on url hash + // + function decodeFragment (hash) { + return hash && (~hash.indexOf('%') ? decodeURIComponent(hash) : hash).slice(1) + } + + var fragment, target, scrollTo + if ((fragment = decodeFragment(window.location.hash)) && (target = document.getElementById(fragment))) { + const langSelection = target.getAttribute('data-lang') + const tabbed = target.closest('.tabbed') + scrollTo = tabbed.querySelector(`[data-lang=${langSelection}]`) + if (scrollTo) { + switchTab({ + target: scrollTo, + }) + } + } }) diff --git a/src/js/12-fragment-jumper.js b/src/js/12-fragment-jumper.js index b2021ca8..b11a1e2d 100644 --- a/src/js/12-fragment-jumper.js +++ b/src/js/12-fragment-jumper.js @@ -24,14 +24,18 @@ e.preventDefault() } var topOffset = toolbar ? toolbar.getBoundingClientRect().bottom : headerNavigationBar.getBoundingClientRect().bottom - + var target = this + var tabs + if ((tabs = target.closest('.tabbed'))) { + target = tabs + } if (cheatSheet) { var scrollTarget = this.closest('div') var selectorsTop = document.querySelector('.nav-container .selectors').querySelector('div').getBoundingClientRect().top if (this.tagName === 'H3') topOffset = selectorsTop window.scrollTo(0, computePosition(scrollTarget, 0) - topOffset) } else { - window.scrollTo(0, computePosition(this, 0) - topOffset) + window.scrollTo(0, computePosition(target, 0) - topOffset) } } From f64f0322eee6960cbb9b4de53adcd32c36179a5e Mon Sep 17 00:00:00 2001 From: Adam Cowley Date: Wed, 6 Mar 2024 13:05:28 +0000 Subject: [PATCH 06/21] GraphAcademy Top-level Menu (#219) --- package-lock.json | 28 ++++++++++----------- src/partials/navbar-end.hbs | 50 +++++++++++++++++++++++++++++-------- 2 files changed, 54 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7d71e5e7..f44a0421 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@antora/cli": "^2.3.3", "@antora/site-generator-default": "^2.3.3", - "@neo4j-ndl/base": "^0.8.3", + "@neo4j-ndl/base": "^2.0.0", "font-awesome": "^4.7.0" }, "devDependencies": { @@ -45,7 +45,7 @@ "gulp-vinyl-zip": "~2.2", "handlebars": "~4.7", "highlight.js": "^10.7", - "highlightjs-cypher": "^1.1", + "highlightjs-cypher": "^1.2", "husky": "^4.3.0", "js-yaml": "~3.13", "medium-zoom": "^1.0.6", @@ -1021,9 +1021,9 @@ } }, "node_modules/@neo4j-ndl/base": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/@neo4j-ndl/base/-/base-0.8.3.tgz", - "integrity": "sha512-GwWAtPkzB7R3nIIDq5s05ct1VXAjncrv2Z6NhwiSRQe6e7iSHddVqlFAoWw6VIffXWPKzKlzZ1ebxRSfm38Gkw==" + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@neo4j-ndl/base/-/base-2.7.1.tgz", + "integrity": "sha512-jsE4Um+5lnsW2S46FRaCidkNI+Qb7QkIr1hdHQyKXisTcBxRZKC1KsJ4/6LqxqyI5qOsu8AIAzlQyjBe9MvPFw==" }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.3", @@ -7725,9 +7725,9 @@ } }, "node_modules/highlightjs-cypher": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/highlightjs-cypher/-/highlightjs-cypher-1.1.5.tgz", - "integrity": "sha512-CKHH2UwydrmXrUEv8m+URq80Mn3BdH81XG0azamJoN7ehHyy713o2W8jkIKIV18/toI4L5xiVBRgTplH6kWdfQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/highlightjs-cypher/-/highlightjs-cypher-1.2.0.tgz", + "integrity": "sha512-mOY/g6R1MgXiYx07icl8nwtXCRDSy4Y9EAlDZKia8Thqe766v6cjnrD6/xWak9UXoLQfWqbHhmRmYuw0SiO+CA==", "dev": true, "dependencies": { "minimist": ">=1.2.6", @@ -18316,9 +18316,9 @@ } }, "@neo4j-ndl/base": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/@neo4j-ndl/base/-/base-0.8.3.tgz", - "integrity": "sha512-GwWAtPkzB7R3nIIDq5s05ct1VXAjncrv2Z6NhwiSRQe6e7iSHddVqlFAoWw6VIffXWPKzKlzZ1ebxRSfm38Gkw==" + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@neo4j-ndl/base/-/base-2.7.1.tgz", + "integrity": "sha512-jsE4Um+5lnsW2S46FRaCidkNI+Qb7QkIr1hdHQyKXisTcBxRZKC1KsJ4/6LqxqyI5qOsu8AIAzlQyjBe9MvPFw==" }, "@nodelib/fs.scandir": { "version": "2.1.3", @@ -23934,9 +23934,9 @@ "dev": true }, "highlightjs-cypher": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/highlightjs-cypher/-/highlightjs-cypher-1.1.5.tgz", - "integrity": "sha512-CKHH2UwydrmXrUEv8m+URq80Mn3BdH81XG0azamJoN7ehHyy713o2W8jkIKIV18/toI4L5xiVBRgTplH6kWdfQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/highlightjs-cypher/-/highlightjs-cypher-1.2.0.tgz", + "integrity": "sha512-mOY/g6R1MgXiYx07icl8nwtXCRDSy4Y9EAlDZKia8Thqe766v6cjnrD6/xWak9UXoLQfWqbHhmRmYuw0SiO+CA==", "dev": true, "requires": { "minimist": ">=1.2.6", diff --git a/src/partials/navbar-end.hbs b/src/partials/navbar-end.hbs index c7a54d9d..176b4879 100644 --- a/src/partials/navbar-end.hbs +++ b/src/partials/navbar-end.hbs @@ -41,9 +41,9 @@ @@ -204,14 +204,6 @@ + {{else}}
-{{#with page.title}} -

{{{this}}}

-{{/with}} -{{#with (or page.attributes.role page.role)}} -
- {{#each (split-string this ' ')}} - - {{/each}} -
-{{/with}} +

{{{ page.title }}}

{{#with (or page.attributes.labels page.labels)}} From b8d6aa0bc76ec0fc6f9d18107457495476866e92 Mon Sep 17 00:00:00 2001 From: Adam Cowley Date: Wed, 6 Mar 2024 15:03:57 +0000 Subject: [PATCH 11/21] 0.20.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index bf97235d..6bcdf98f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@neo4j/docs-ui", - "version": "0.20.0", + "version": "0.20.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@neo4j/docs-ui", - "version": "0.20.0", + "version": "0.20.1", "license": "MPL-2.0", "dependencies": { "@antora/cli": "^2.3.3", diff --git a/package.json b/package.json index e147d466..bbb22f70 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@neo4j/docs-ui", - "version": "0.20.0", + "version": "0.20.1", "description": "Produces the UI bundle for the Neo4j documentation site", "homepage": "https://github.com/neo4j-documentation/docs-ui", "license": "MPL-2.0", From 3d3c8cf16401cb7882d398f300679e6178cd96d5 Mon Sep 17 00:00:00 2001 From: Adam Cowley Date: Wed, 6 Mar 2024 15:05:45 +0000 Subject: [PATCH 12/21] 0.21.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6bcdf98f..102b32ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@neo4j/docs-ui", - "version": "0.20.1", + "version": "0.21.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@neo4j/docs-ui", - "version": "0.20.1", + "version": "0.21.0", "license": "MPL-2.0", "dependencies": { "@antora/cli": "^2.3.3", diff --git a/package.json b/package.json index bbb22f70..a36f4e89 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@neo4j/docs-ui", - "version": "0.20.1", + "version": "0.21.0", "description": "Produces the UI bundle for the Neo4j documentation site", "homepage": "https://github.com/neo4j-documentation/docs-ui", "license": "MPL-2.0", From 3a3e5c8d9cd59fd4b1d63d6339e2a01ffcc3d49c Mon Sep 17 00:00:00 2001 From: Adam Cowley Date: Wed, 6 Mar 2024 15:06:57 +0000 Subject: [PATCH 13/21] 0.22.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 102b32ee..2fc8927d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@neo4j/docs-ui", - "version": "0.21.0", + "version": "0.22.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@neo4j/docs-ui", - "version": "0.21.0", + "version": "0.22.0", "license": "MPL-2.0", "dependencies": { "@antora/cli": "^2.3.3", diff --git a/package.json b/package.json index a36f4e89..5397c5e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@neo4j/docs-ui", - "version": "0.21.0", + "version": "0.22.0", "description": "Produces the UI bundle for the Neo4j documentation site", "homepage": "https://github.com/neo4j-documentation/docs-ui", "license": "MPL-2.0", From 28f1d33766109f54ba6401983211d8eb620946b4 Mon Sep 17 00:00:00 2001 From: Adam Cowley Date: Wed, 6 Mar 2024 15:07:02 +0000 Subject: [PATCH 14/21] 0.23.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2fc8927d..e51f4414 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@neo4j/docs-ui", - "version": "0.22.0", + "version": "0.23.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@neo4j/docs-ui", - "version": "0.22.0", + "version": "0.23.0", "license": "MPL-2.0", "dependencies": { "@antora/cli": "^2.3.3", diff --git a/package.json b/package.json index 5397c5e6..484f05de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@neo4j/docs-ui", - "version": "0.22.0", + "version": "0.23.0", "description": "Produces the UI bundle for the Neo4j documentation site", "homepage": "https://github.com/neo4j-documentation/docs-ui", "license": "MPL-2.0", From 6b6e06d09cbfe2e200912d745de864028d93e731 Mon Sep 17 00:00:00 2001 From: Adam Cowley Date: Thu, 7 Mar 2024 15:22:14 +0000 Subject: [PATCH 15/21] Use full URL for logo --- src/partials/header-content.hbs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/partials/header-content.hbs b/src/partials/header-content.hbs index 1787ace3..0f66e624 100644 --- a/src/partials/header-content.hbs +++ b/src/partials/header-content.hbs @@ -15,29 +15,29 @@ Cypher Cheat Sheet - + {{else if (eq page.attributes.theme "labs")}} Labs {{else if (eq page.attributes.theme "kb")}} - + Knowledge Base {{else if (eq page.attributes.theme "training")}} - + GraphAcademy {{else if (eq page.attributes.theme "graphgists")}} - + GraphGists {{else}} - + Developer From f087dc66c6ad27d67ec2faa395ad36b06c6b3cb8 Mon Sep 17 00:00:00 2001 From: Adam Cowley Date: Thu, 7 Mar 2024 15:22:23 +0000 Subject: [PATCH 16/21] 0.23.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e51f4414..d626fff0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@neo4j/docs-ui", - "version": "0.23.0", + "version": "0.23.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@neo4j/docs-ui", - "version": "0.23.0", + "version": "0.23.1", "license": "MPL-2.0", "dependencies": { "@antora/cli": "^2.3.3", diff --git a/package.json b/package.json index 484f05de..51bc943f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@neo4j/docs-ui", - "version": "0.23.0", + "version": "0.23.1", "description": "Produces the UI bundle for the Neo4j documentation site", "homepage": "https://github.com/neo4j-documentation/docs-ui", "license": "MPL-2.0", From bd7739daac2c6538b8ce121b3b9c0fca7edac14e Mon Sep 17 00:00:00 2001 From: Neil Dewhurst Date: Fri, 8 Mar 2024 18:32:21 +0000 Subject: [PATCH 17/21] Roles labels refinement (#220) Fixes a few issues in the initial implementation of #211: - adds `cluster` and `dynamic` labels - fixes padding in admonitions --- preview-src/docs-roles.adoc | 8 +++++++- src/css/labels.css | 5 +++++ src/js/60-docs-roles.js | 5 +++-- src/js/data/rolesData.json | 9 +++++++++ src/partials/header-content.hbs | 12 ++++++++---- 5 files changed, 32 insertions(+), 7 deletions(-) diff --git a/preview-src/docs-roles.adoc b/preview-src/docs-roles.adoc index 1fb6d250..3dd9d883 100644 --- a/preview-src/docs-roles.adoc +++ b/preview-src/docs-roles.adoc @@ -18,6 +18,12 @@ Flags sections as Not Available on Aura, Aura DB Enterprise, Enterprise Edition, Blocks with the appropriate roles have labels added. +[discrete] +[role="label--new-5.17 label--enterprise-edition"] +=== (Discrete) H3 AuraDB Enterprise AND Not on Aura + +Lorem ipsum dolor sit + [role=label--aura-db-enterprise label--not-on-aura] === H3 AuraDB Enterprise AND Not on Aura @@ -26,7 +32,7 @@ Lorem ipsum dolor sit Open blocks can be used to mark multiple paragraphs within a section. -[role=label--new-5.17] +[role=label--dynamic-5.17] -- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris eget leo nunc, nec tempus mi? Curabitur id nisl mi, ut vulputate urna. diff --git a/src/css/labels.css b/src/css/labels.css index 014aa938..87d2ad6f 100644 --- a/src/css/labels.css +++ b/src/css/labels.css @@ -10,6 +10,10 @@ flex-wrap: wrap; } +.admonitionblock > div.labels { + padding: 1rem 1rem 0.75rem; +} + .header-label-container > div.labels { display: flex; align-self: center; @@ -25,6 +29,7 @@ .header-label-container > div.labels.wrapped { margin-left: 0; + margin-top: 0.5rem; } .doc > .sect-header > h1.page:first-child:has(> .labels) { diff --git a/src/js/60-docs-roles.js b/src/js/60-docs-roles.js index 8189e7c7..4b6c867f 100644 --- a/src/js/60-docs-roles.js +++ b/src/js/60-docs-roles.js @@ -44,9 +44,10 @@ document.addEventListener('DOMContentLoaded', function () { } // get version number for version labels - if (rolesData[label].labelCategory === 'version' && labelParts[1]) { + if ((rolesData[label].labelCategory === 'version' || rolesData[label].versionText) && labelParts[1]) { labelDetails.data.version = labelParts[1] - labelDetails.text += ' in ' + labelDetails.data.version + const joinText = rolesData[label].versionText ? rolesData[label].versionText : 'in' + labelDetails.text = [labelDetails.text, joinText, labelDetails.data.version].join(' ') } return labelDetails diff --git a/src/js/data/rolesData.json b/src/js/data/rolesData.json index 176257f3..f71f2486 100644 --- a/src/js/data/rolesData.json +++ b/src/js/data/rolesData.json @@ -86,6 +86,11 @@ "labelCategory": "version", "displayText": "Discontinued" }, + "dynamic":{ + "labelCategory": "function", + "displayText": "Dynamic", + "versionText": "since" + }, "alpha":{ "labelCategory": "version", "displayText": "Alpha" @@ -184,6 +189,10 @@ "labelCategory": "environment", "displayText": "Windows" }, + "cluster":{ + "labelCategory": "function", + "displayText": "Cluster" + }, "cluster-member-core":{ "labelCategory": "function", "displayText": "CORE" diff --git a/src/partials/header-content.hbs b/src/partials/header-content.hbs index 0f66e624..e5571a0d 100644 --- a/src/partials/header-content.hbs +++ b/src/partials/header-content.hbs @@ -22,22 +22,26 @@ Labs {{else if (eq page.attributes.theme "kb")}} - + + {{!-- --}} Knowledge Base {{else if (eq page.attributes.theme "training")}} - + + {{!-- --}} GraphAcademy {{else if (eq page.attributes.theme "graphgists")}} - + + {{!-- --}} GraphGists {{else}} - + + {{!-- --}} Developer From 75bdd8c509ae6852a9131e2f21eab73b4c056e82 Mon Sep 17 00:00:00 2001 From: Neil Dewhurst Date: Fri, 8 Mar 2024 18:35:02 +0000 Subject: [PATCH 18/21] 0.23.2 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d626fff0..856e983a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@neo4j/docs-ui", - "version": "0.23.1", + "version": "0.23.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@neo4j/docs-ui", - "version": "0.23.1", + "version": "0.23.2", "license": "MPL-2.0", "dependencies": { "@antora/cli": "^2.3.3", diff --git a/package.json b/package.json index 51bc943f..0e6db319 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@neo4j/docs-ui", - "version": "0.23.1", + "version": "0.23.2", "description": "Produces the UI bundle for the Neo4j documentation site", "homepage": "https://github.com/neo4j-documentation/docs-ui", "license": "MPL-2.0", From 4ec7c3abfaad858a1d9a53b1d6ecadaabe0f437d Mon Sep 17 00:00:00 2001 From: Neil Dewhurst Date: Fri, 8 Mar 2024 19:18:41 +0000 Subject: [PATCH 19/21] fix tabs bug (#221) --- src/js/08-tabs-block.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/js/08-tabs-block.js b/src/js/08-tabs-block.js index 252167e6..1e87ddae 100644 --- a/src/js/08-tabs-block.js +++ b/src/js/08-tabs-block.js @@ -213,15 +213,13 @@ document.addEventListener('DOMContentLoaded', function () { return hash && (~hash.indexOf('%') ? decodeURIComponent(hash) : hash).slice(1) } - var fragment, target, scrollTo - if ((fragment = decodeFragment(window.location.hash)) && (target = document.getElementById(fragment))) { - const langSelection = target.getAttribute('data-lang') - const tabbed = target.closest('.tabbed') - scrollTo = tabbed.querySelector(`[data-lang=${langSelection}]`) - if (scrollTo) { - switchTab({ - target: scrollTo, - }) - } + var fragment, target, langSelection, scrollTo + if ((fragment = decodeFragment(window.location.hash)) && + (target = document.getElementById(fragment)) && + (langSelection = target.getAttribute('data-lang')) && + (scrollTo = target.closest('.tabbed').querySelector(`[data-lang=${langSelection}]`))) { + switchTab({ + target: scrollTo, + }) } }) From 2c26319b3793c2287b7e498ba1479e731400f7c1 Mon Sep 17 00:00:00 2001 From: Neil Dewhurst Date: Fri, 8 Mar 2024 19:19:50 +0000 Subject: [PATCH 20/21] 0.23.3 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 856e983a..76e41078 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@neo4j/docs-ui", - "version": "0.23.2", + "version": "0.23.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@neo4j/docs-ui", - "version": "0.23.2", + "version": "0.23.3", "license": "MPL-2.0", "dependencies": { "@antora/cli": "^2.3.3", diff --git a/package.json b/package.json index 0e6db319..182adbf7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@neo4j/docs-ui", - "version": "0.23.2", + "version": "0.23.3", "description": "Produces the UI bundle for the Neo4j documentation site", "homepage": "https://github.com/neo4j-documentation/docs-ui", "license": "MPL-2.0", From b772b71ad93d55a1f187417826acd2f738b10a63 Mon Sep 17 00:00:00 2001 From: Stefano Ottolenghi Date: Fri, 15 Mar 2024 13:40:24 +0100 Subject: [PATCH 21/21] Add highlight.js language `parameters` as an alias for `json`, for cypher query parameters. --- src/js/vendor/highlight.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/vendor/highlight.js b/src/js/vendor/highlight.js index d9599693..1315ee64 100644 --- a/src/js/vendor/highlight.js +++ b/src/js/vendor/highlight.js @@ -19,6 +19,7 @@ hljs.registerLanguage('java', require('highlight.js/lib/languages/java')) hljs.registerLanguage('javascript', require('highlight.js/lib/languages/javascript')) hljs.registerLanguage('json', require('highlight.js/lib/languages/json')) + hljs.registerLanguage('parameters', require('highlight.js/lib/languages/json')) // cypher parameters hljs.registerLanguage('kotlin', require('highlight.js/lib/languages/kotlin')) hljs.registerLanguage('makefile', require('highlight.js/lib/languages/makefile')) hljs.registerLanguage('markdown', require('highlight.js/lib/languages/markdown'))