Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f3e3307
Add legacy docs for .NET client
w1am Jul 22, 2025
2bd8513
Fix branch name for .NET
w1am Jul 22, 2025
f456388
Implement redirect for dotnet client only
w1am Jul 22, 2025
fb36967
Fixup
w1am Jul 22, 2025
d4de175
use latest version for navbar links
w1am Jul 22, 2025
ce1312c
Redirect if version page is reached
w1am Jul 22, 2025
331ed6f
Add dynamic route for dotnet client version with trailing slash
w1am Jul 22, 2025
52fb55b
Add docs for dotnet v1
w1am Jul 22, 2025
593f692
Add dynamic routes for dotnet client versioning
w1am Jul 22, 2025
70f9252
Remove redirects
w1am Jul 22, 2025
61eda9c
Add docs for Java, NodeJS, Rust, Go and Python
w1am Jul 23, 2025
efed464
Trigger cloudflare
w1am Jul 24, 2025
c22db4d
Remove commented code
w1am Jul 24, 2025
1525e9a
Version dropdown
alexeyzimarev Jun 23, 2025
b69a622
Fix path segments
w1am Jul 25, 2025
8dd2265
Rename import
w1am Jul 25, 2025
eeb91a8
Support alias in repos
w1am Jul 25, 2025
cab4c40
Update KurrentDB and K8 operator navbar items
w1am Jul 25, 2025
92a301c
change legacy paths for clients
w1am Jul 25, 2025
03ec6c2
Undo path changes
w1am Jul 25, 2025
b06b6a0
Redo path changes
w1am Jul 25, 2025
3fb8d96
[DEV-780] Move versions from navbar to version selector (#899)
alexeyzimarev Jul 26, 2025
ad67f02
Docs for Operator v1.2.0 (#904)
rb-kurrent Jul 26, 2025
e14830e
Fix broken links and anchors (#905)
alexeyzimarev Jul 26, 2025
dd0b935
Merge branch 'master' into w1am/import-client-docs
alexeyzimarev Jul 26, 2025
fe78528
Merge master and clean some broken links
alexeyzimarev Jul 26, 2025
9c81a4d
Fix redirects and simplify versioning logic in dropdown
w1am Jul 28, 2025
5f79ec7
Temporarily disable all redirects
w1am Jul 28, 2025
a1966e0
Redo redirects
w1am Jul 28, 2025
4798a54
Fix _redirects
w1am Jul 28, 2025
0c98ada
More explicit redirects for clients
w1am Jul 28, 2025
824f715
Ignore redirects for tcp
w1am Jul 28, 2025
862a12a
Fix JVM client link
w1am Jul 28, 2025
2193e34
Explicitly define sidebar structure for v5 and v22.10
w1am Jul 28, 2025
9f1ff97
Update branch references
w1am Jul 28, 2025
43781b5
Add redirects for v22.10 and v5
w1am Jul 28, 2025
c7b539f
Add dynamic routes for legacy client versions and update existing cli…
w1am Jul 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,7 @@ generated-versions.json
docs/.vuepress/.temp/
docs/.vuepress/.cache/
docs/.vuepress/dist/

config.ts.*.mjs

docs/clients/grpc/**/*
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Configuration for sidebars can be found in the `/docs/.vuepress/configs/sidebar.

```typescript
export const sidebarEn: EsSidebarOptions = {
"/clients/grpc/": "structure",
"/clients/": "structure",
"/cloud/": "structure",
}
```
Expand Down
84 changes: 56 additions & 28 deletions docs/.vuepress/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,25 @@ import CloudBanner from "./components/CloudBanner.vue";
import KapaWidget from './components/KapaWidget.vue';
import UserFeedback from './components/TocWithFeedback';
import {usePostHog} from "./lib/usePosthog";
import SidebarLayout from "./layouts/SidebarLayout.vue";

declare const __VERSIONS__: { latest: string, selected: string, all: string[] }
declare const __VERSIONS__: {
latest: string,
selected: string,
all: {
id: string,
group: string,
basePath: string,
versions: {
version: string,
path: string,
startPage: string,
preview?: boolean,
deprecated?: boolean,
hide?: boolean
}[]
}[]
}

const storageKey = "VUEPRESS_TAB_STORE";

Expand All @@ -30,15 +47,6 @@ const findEsMeta = (route) => {
}
}

interface ClientConfig {
enhance?: (context: {
app: any;
router: Router;
siteData: any;
}) => void | Promise<void>;
setup?: () => void;
}

const removeHtml = (path: string) => path.replace(".html", "");

const reload = () => {
Expand All @@ -55,14 +63,16 @@ const leave = (to: RouteLocationNormalized, from: RouteLocationNormalized) => {
}
}

const { posthog } = usePostHog();
const {posthog} = usePostHog();

export default defineClientConfig({
layouts: {
Layout: SidebarLayout
},
enhance({app, router, _}) {
app.component("CloudBanner", CloudBanner);
app.component("KapaWidget", KapaWidget);
app.component("UserFeedback", UserFeedback);
const apiPath = __VERSIONS__.latest.replace("server", "http-api");
const addFixedRoute = (from: string, to: string) => router.addRoute({
path: from, redirect: _ => {
reload();
Expand All @@ -79,16 +89,16 @@ export default defineClientConfig({
});

// Router configuration
addFixedRoute("/http-api/", `${apiPath}/introduction`);
addFixedRoute("/server/http-api/", `/${__VERSIONS__.latest}/http-api/introduction`);
addFixedRoute("/cloud/", `/cloud/introduction.html`);
router.afterEach(() => {
setTimeout(() => { // to ensure this runs after DOM updates
try {
const {code} = JSON.parse(localStorage.getItem('VUEPRESS_TAB_STORE'));
const {code} = JSON.parse(localStorage.getItem('VUEPRESS_TAB_STORE')!);
if (code) { // If a valid 'code' is found in localStorage
Array.from(document.querySelectorAll('.vp-tab-nav'))
.forEach((button: HTMLButtonElement) => {
if (button.textContent.trim() === code) {
if (button.textContent!.trim() === code) {
button.click(); // click the button to switch the tab
}
});
Expand All @@ -98,18 +108,36 @@ export default defineClientConfig({
}
}, 0);
});
const operatorLatest = __VERSIONS__.all.filter(x => x.id == 'kubernetes-operator')[0].versions[0].version;
const operatorLatest = __VERSIONS__.all.filter(x => x.id === 'kubernetes-operator')[0].versions[0].version;
addDynamicRoute("/server/kubernetes-operator", to => `/server/kubernetes-operator/${operatorLatest}/getting-started/`);
addDynamicRoute("/server/kubernetes-operator/:version", to => `/server/kubernetes-operator/${to.params.version}/getting-started/`);

addDynamicRoute('/clients/:lang(dotnet|golang|java|node|python|rust)/legacy/:version', to => {
const version = to.params.version;
const latestVersion = __VERSIONS__.all.find(x => x.id === `${to.params.lang}-client`)?.versions.find(v => v.path === `legacy/${version}`)
return `/clients/${to.params.lang}/legacy/${to.params.version}/${latestVersion?.startPage}`;
});
addDynamicRoute('/clients/:lang(dotnet|golang|java|node|python|rust)/legacy', to => {
const latestVersion = __VERSIONS__.all.find(x => x.id === `${to.params.lang}-client`)?.versions.find(v => v.path.startsWith('legacy/'))
return `/clients/${to.params.lang}/${latestVersion?.path}/${latestVersion?.startPage}`;
})

addDynamicRoute('/clients/:lang(dotnet|golang|java|node|python|rust)/:version', to => {
const version = to.params.version;
const latestVersion = __VERSIONS__.all.find(x => x.id === `${to.params.lang}-client`)?.versions.find(v => v.path === version)
return `/clients/${to.params.lang}/${version}/${latestVersion?.startPage}`;
});
addDynamicRoute('/clients/:lang(dotnet|golang|java|node|python|rust)', to => {
const latestVersion = __VERSIONS__.all.find(x => x.id === `${to.params.lang}-client`)?.versions[0]
return `/clients/${to.params.lang}/${latestVersion?.path}/${latestVersion?.startPage}`;
})


// Add fixed routes for server versions because they don't use the same sidebar structure as the other versions
addFixedRoute("/server/v22.10", "/server/v22.10/introduction.html");
addFixedRoute("/server/v5", "/server/v5/introduction.html");

addDynamicRoute("/server/:version", to => `/server/${to.params.version}/quick-start/`);
addDynamicRoute('/client/:lang',
to => {
const lang = to.params.lang === "csharp" ? "C#" : to.params.lang;
const stored = JSON.parse(localStorage.getItem(storageKey) ?? "{}");
localStorage.setItem(storageKey, JSON.stringify({...stored, code: lang}));
return '/clients/grpc/getting-started.html';
});
addDynamicRoute('/latest/:pathMatch(.*)*', to => to.path.replace(/^\/latest/, `/${__VERSIONS__.latest}`));
addFixedRoute("/server/latest", `/${__VERSIONS__.latest}/quick-start/`);
addFixedRoute("/latest", `/${__VERSIONS__.latest}/quick-start/`);
Expand All @@ -135,13 +163,13 @@ export default defineClientConfig({
});
}, 1000);
}

// Check for 404 page after navigation completes
setTimeout(() => {
// Check for the specific elements with classes error-code and error-hint
const errorCodeElement = document.querySelector('p.error-code');
const errorHintElement = document.querySelector('p.error-hint');

// If both elements exist, we're on a 404 page
if (errorCodeElement && errorHintElement) {
// Capture the 404 event in PostHog
Expand All @@ -154,15 +182,15 @@ export default defineClientConfig({
});
}
}
}, 50);
}, 50);
});
router.beforeEach((to, from) => leave(to, from));
},
setup() {
onMounted(() => {
const route = useRoute();
if (route.path !== "/");
if (route.path !== "/") ;
});

},
} satisfies ClientConfig);
});
1 change: 0 additions & 1 deletion docs/.vuepress/components/KapaWidget.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script setup>
function triggerKapa() {
window.Kapa.open();

}
</script>

Expand Down
4 changes: 2 additions & 2 deletions docs/.vuepress/components/TocWithFeedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import {
usePageFrontmatter,
useRoute,
} from "vuepress/client";
import PrintButton from "vuepress-theme-hope/modules/info/components/PrintButton";
import { useMetaLocale } from "vuepress-theme-hope/modules/info/composables/index";
import PrintButton from "vuepress-theme-hope/components/base/PrintButton";
import { useMetaLocale } from "vuepress-theme-hope/composables/info/index";

import "../styles/toc.scss";

Expand Down
44 changes: 0 additions & 44 deletions docs/.vuepress/components/Version.vue

This file was deleted.

Loading