Skip to content

Commit 4f77767

Browse files
authored
Update all links within application (lensapp#6442)
- URLs removed the /latest/ and /main/ pathname prefixes Signed-off-by: Sebastian Malton <[email protected]> Signed-off-by: Sebastian Malton <[email protected]>
1 parent d4f9128 commit 4f77767

File tree

9 files changed

+26
-20
lines changed

9 files changed

+26
-20
lines changed

.github/workflows/mkdocs-manual.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ jobs:
5353
rm -fr ./docs/clusters ./docs/contributing ./docs/faq ./docs/getting-started ./docs/helm ./docs/support ./docs/supporting
5454
sed -i '/Protocol Handlers/d' ./mkdocs.yml
5555
sed -i '/IPC/d' ./mkdocs.yml
56-
sed -i 's#../../clusters/adding-clusters.md#https://docs.k8slens.dev/latest/clusters/adding-clusters/#g' ./docs/extensions/get-started/your-first-extension.md
57-
sed -i 's#clusters/adding-clusters.md#https://docs.k8slens.dev/latest/clusters/adding-clusters/#g' ./docs/README.md
58-
sed -i 's#../../contributing/README.md#https://docs.k8slens.dev/latest/contributing/#g' ./docs/extensions/guides/generator.md
56+
sed -i 's#../../clusters/adding-clusters.md#https://docs.k8slens.dev/getting-started/add-cluster/#g' ./docs/extensions/get-started/your-first-extension.md
57+
sed -i 's#clusters/adding-clusters.md#https://docs.k8slens.dev//getting-started/adding-clusters/#g' ./docs/README.md
58+
sed -i 's#../../contributing/README.md#https://docs.k8slens.dev/contributing/#g' ./docs/extensions/guides/generator.md
5959
6060
- name: git config
6161
run: |

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Contributing to Lens
22

3-
See [Contributing to Lens](https://docs.k8slens.dev/latest/contributing/) documentation.
3+
See [Contributing to Lens](https://docs.k8slens.dev/contributing/) documentation.

docs/extensions/get-started/your-first-extension.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ npm run dev
7878
You must restart Lens for the extension to load.
7979
After this initial restart, reload Lens and it will automatically pick up changes any time the extension rebuilds.
8080

81-
With Lens running, either connect to an existing cluster or create a new one - refer to the latest [Lens Documentation](https://docs.k8slens.dev/main/catalog/) for details on how to add a cluster in Lens IDE.
81+
With Lens running, either connect to an existing cluster or create a new one - refer to the latest [Lens Documentation](https://docs.k8slens.dev/getting-started/add-cluster/) for details on how to add a cluster in Lens IDE.
8282
You will see the "Hello World" page in the left-side cluster menu.
8383

8484
## Develop the Extension

docs/extensions/guides/generator.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ Open `my-first-lens-ext/renderer.tsx` and change the value of `title` from `"Hel
4646

4747
```typescript
4848
clusterPageMenus = [
49-
{
50-
target: { pageId: "hello" },
51-
title: "Hello Lens",
52-
components: {
53-
Icon: ExampleIcon,
54-
}
55-
}
56-
]
49+
{
50+
target: { pageId: "hello" },
51+
title: "Hello Lens",
52+
components: {
53+
Icon: ExampleIcon,
54+
},
55+
},
56+
];
5757
```
5858

5959
Reload Lens and you will see that the menu item text has changed to "Hello Lens".
@@ -70,6 +70,6 @@ To debug your extension, please see our instructions on [Testing Extensions](../
7070
To dive deeper, consider looking at [Common Capabilities](../capabilities/common-capabilities.md), [Styling](../capabilities/styling.md), or [Extension Anatomy](anatomy.md).
7171

7272
If you find problems with the Lens Extension Generator, or have feature requests, you are welcome to raise an [issue](https://github.com/lensapp/generator-lens-ext/issues).
73-
You can find the latest Lens contribution guidelines [here](https://docs.k8slens.dev/latest/contributing).
73+
You can find the latest Lens contribution guidelines [here](https://docs.k8slens.dev/contributing).
7474

7575
The Generator source code is hosted at [GitHub](https://github.com/lensapp/generator-lens-ext).

docs/extensions/guides/renderer-extension.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ Construct the table using the `Renderer.Component.Table` and related elements.
771771

772772
For each pod the name, age, and status are obtained using the `Renderer.K8sApi.Pod` methods.
773773
The table is constructed using the `Renderer.Component.Table` and related elements.
774-
See [Component documentation](https://docs.k8slens.dev/latest/extensions/api/modules/_renderer_api_components_/) for further details.
774+
See [Component documentation](https://api-docs.k8slens.dev/latest/extensions/api/modules/Renderer.Component/) for further details.
775775

776776
### `kubeObjectStatusTexts`
777777

src/common/vars.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export const apiKubePrefix = "/api-kube"; // k8s cluster apis
123123
// Links
124124
export const issuesTrackerUrl = "https://github.com/lensapp/lens/issues" as string;
125125
export const slackUrl = "https://join.slack.com/t/k8slens/shared_invite/zt-wcl8jq3k-68R5Wcmk1o95MLBE5igUDQ" as string;
126-
export const supportUrl = "https://docs.k8slens.dev/latest/support/" as string;
126+
export const supportUrl = "https://docs.k8slens.dev/support/" as string;
127127

128128
export const lensWebsiteWeblinkId = "lens-website-link";
129129
export const lensDocumentationWeblinkId = "lens-documentation-link";
@@ -132,4 +132,4 @@ export const lensTwitterWeblinkId = "lens-twitter-link";
132132
export const lensBlogWeblinkId = "lens-blog-link";
133133
export const kubernetesDocumentationWeblinkId = "kubernetes-documentation-link";
134134

135-
export const docsUrl = "https://docs.k8slens.dev/main" as string;
135+
export const docsUrl = "https://docs.k8slens.dev" as string;

src/features/add-cluster/__snapshots__/navigation-using-application-menu.test.tsx.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ exports[`add-cluster - navigation using application menu when navigating to add
279279
</code>
280280
file.
281281
<a
282-
href="https://docs.k8slens.dev/main/getting-started/add-cluster/"
282+
href="https://docs.k8slens.dev/getting-started/add-cluster/"
283283
rel="noreferrer"
284284
target="_blank"
285285
>

src/features/extensions/__snapshots__/navigation-using-application-menu.test.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ exports[`extensions - navigation using application menu when navigating to exten
275275
<p>
276276
Add new features via Lens Extensions. Check out the
277277
<a
278-
href="https://docs.k8slens.dev/main/extensions/"
278+
href="https://docs.k8slens.dev/extensions/"
279279
rel="noreferrer"
280280
target="_blank"
281281
>

src/migrations/weblinks-store/currentVersion.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under MIT License. See LICENSE in root directory for more information.
44
*/
55

6-
import { lensSlackWeblinkId, slackUrl } from "../../common/vars";
6+
import { docsUrl, lensDocumentationWeblinkId, lensSlackWeblinkId, slackUrl } from "../../common/vars";
77
import type { WeblinkData } from "../../common/weblink-store";
88
import type { MigrationDeclaration } from "../helpers";
99
import packageJson from "../../../package.json";
@@ -20,6 +20,12 @@ export default {
2020
slackWeblink.url = slackUrl;
2121
}
2222

23+
const docsWeblink = weblinks.find(weblink => weblink.id === lensDocumentationWeblinkId);
24+
25+
if (docsWeblink) {
26+
docsWeblink.url = docsUrl;
27+
}
28+
2329
store.set("weblinks", weblinks);
2430
},
2531
} as MigrationDeclaration;

0 commit comments

Comments
 (0)