From a65eaa2cc3d1b3a7fd1d61dadd4c583991883125 Mon Sep 17 00:00:00 2001 From: Heitor Tashiro Sergent Date: Mon, 29 Jul 2024 13:35:44 -0500 Subject: [PATCH] Update top nav links (#1675) * Update top nav links * Add admonition to homepage --- gatsby-node.js | 18 ++----- .../doc-welcome/outdated-blockquote/index.js | 1 + .../outdated-blockquote.view.js | 27 +++++++++++ .../doc-welcome/use-cases/use-cases.view.js | 47 +++++++++++++------ src/templates/docs/guides.js | 16 ++----- 5 files changed, 69 insertions(+), 40 deletions(-) create mode 100644 src/components/pages/doc-welcome/outdated-blockquote/index.js create mode 100644 src/components/pages/doc-welcome/outdated-blockquote/outdated-blockquote.view.js diff --git a/gatsby-node.js b/gatsby-node.js index a8b7e2b10..760e01716 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -176,19 +176,11 @@ const getPageVersions = ( const topLevelLinks = [ { label: 'guides', - to: '/', + to: 'https://grafana.com/docs/k6/latest/', }, { label: 'JAVASCRIPT API', - to: '/javascript-api/', - submenu: [ - { label: 'k6 API', to: `/javascript-api/` }, - { - label: 'xk6-disruptor', - to: `/javascript-api/xk6-disruptor/`, - }, - { label: 'jslib', to: `/javascript-api/jslib/` }, - ], + to: 'https://grafana.com/docs/k6/latest/javascript-api/', }, { label: 'Cloud Docs', @@ -203,15 +195,15 @@ const topLevelLinks = [ }, { label: 'Extensions', - to: '/extensions/', + to: 'https://grafana.com/docs/k6/latest/extensions/', }, { label: 'Integrations', - to: '/integrations/', + to: 'https://grafana.com/docs/k6/latest/misc/integrations/', }, { label: 'examples', - to: '/examples/', + to: 'https://grafana.com/docs/k6/latest/examples/', }, ]; diff --git a/src/components/pages/doc-welcome/outdated-blockquote/index.js b/src/components/pages/doc-welcome/outdated-blockquote/index.js new file mode 100644 index 000000000..c156aec5c --- /dev/null +++ b/src/components/pages/doc-welcome/outdated-blockquote/index.js @@ -0,0 +1 @@ +export { OutdatedBlockquote } from './outdated-blockquote.view'; diff --git a/src/components/pages/doc-welcome/outdated-blockquote/outdated-blockquote.view.js b/src/components/pages/doc-welcome/outdated-blockquote/outdated-blockquote.view.js new file mode 100644 index 000000000..7c559927e --- /dev/null +++ b/src/components/pages/doc-welcome/outdated-blockquote/outdated-blockquote.view.js @@ -0,0 +1,27 @@ +import Blockquote from 'components/shared/blockquote'; +import React from 'react'; + +export const OutdatedBlockquote = () => ( +
+
+

+ We've migrated the k6 documentation to Grafana!{' '} + + Click here + {' '} + to view the latest version of the k6 documentation. +
+
+ This page is still available for users to be able to view the{' '} + + k6 Cloud documentation + + , and will be removed at a later date. +

+
+
+
+); diff --git a/src/components/pages/doc-welcome/use-cases/use-cases.view.js b/src/components/pages/doc-welcome/use-cases/use-cases.view.js index a7f8e3d2c..639f46a82 100644 --- a/src/components/pages/doc-welcome/use-cases/use-cases.view.js +++ b/src/components/pages/doc-welcome/use-cases/use-cases.view.js @@ -1,6 +1,5 @@ import { Heading } from 'components/shared/heading'; import { useI18n } from 'contexts/i18n-provider'; -import { useLocale } from 'contexts/locale-provider'; import { Link } from 'gatsby'; import React from 'react'; @@ -8,7 +7,6 @@ import styles from './use-cases.module.scss'; export const UseCases = () => { const { t } = useI18n(); - const { urlLocale } = useLocale(); return (
@@ -26,9 +24,7 @@ export const UseCases = () => { spike @@ -37,9 +33,7 @@ export const UseCases = () => { stress @@ -48,9 +42,7 @@ export const UseCases = () => { soak tests @@ -65,7 +57,10 @@ export const UseCases = () => {

{t('welcome.use-cases.browser-testing.pre-description')} - + k6 browser {t('welcome.use-cases.browser-testing.description')} @@ -76,8 +71,15 @@ export const UseCases = () => { {t('welcome.use-cases.chaos-testing.title')}

- {t('welcome.use-cases.chaos-testing.description')} - + You can use k6 to simulate traffic as part of your chaos + experiments, trigger them from your k6 tests or inject different + types of faults in Kubernetes with{' '} + xk6-disruptor . @@ -87,7 +89,22 @@ export const UseCases = () => { {t('welcome.use-cases.performance-monitoring.title')} -

{t('welcome.use-cases.performance-monitoring.description')}

+

+ With k6, you can automate and schedule to trigger tests very + frequently with a small load to continuously validate the + performance and availability of your production environment. You can + also use{' '} + + Grafana Cloud Synthetic Monitoring + {' '} + for a managed solution built specifically for synthetic monitoring + that supports k6 test scripts. +

diff --git a/src/templates/docs/guides.js b/src/templates/docs/guides.js index bd4162854..557f85205 100644 --- a/src/templates/docs/guides.js +++ b/src/templates/docs/guides.js @@ -1,13 +1,8 @@ import classNames from 'classnames'; import { DocPageNavigation } from 'components/pages/doc-page/doc-page-navigation'; import TableOfContents from 'components/pages/doc-page/table-of-contents'; -import { - Features, - Manifesto, - Quickstart, - WhatIs, -} from 'components/pages/doc-welcome'; -import { K6DoesNot } from 'components/pages/doc-welcome/k6-does-not'; +import { Features, WhatIs } from 'components/pages/doc-welcome'; +import { OutdatedBlockquote } from 'components/pages/doc-welcome/outdated-blockquote'; import { UseCases } from 'components/pages/doc-welcome/use-cases'; import { PageInfo } from 'components/shared/page-info'; import { SEO } from 'components/shared/seo'; @@ -23,8 +18,7 @@ import { flattenSidebarTree } from 'utils/utils'; const pageInfo = { en: { title: 'Welcome to the k6 documentation', - description: - 'This documentation will help you go from a total beginner to a seasoned k6 expert!', + description: '', }, es: { title: 'Bienvenido a la documentación de k6', @@ -66,12 +60,10 @@ const GuidesContent = ({
- + - -