From a5476c514ebc198c08780b54a7eb63eb385eb717 Mon Sep 17 00:00:00 2001 From: Anmol Date: Wed, 11 Oct 2023 09:16:17 +0300 Subject: [PATCH] fix docs and getting-started example readme (#272) * fix docs and getting-started example readme * add head --- docs/pages/get-started/step-5.mdx | 2 +- docs/theme.config.js | 21 +++++++++++++++++++++ examples/getting-started/README.md | 1 - 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/docs/pages/get-started/step-5.mdx b/docs/pages/get-started/step-5.mdx index 933c219d..01aa3144 100644 --- a/docs/pages/get-started/step-5.mdx +++ b/docs/pages/get-started/step-5.mdx @@ -1,4 +1,4 @@ -# **Step 4:** All in one place +# **Step 5:** All in one place ## TLDR We have created some handy example directory for the tutorial you just went through. diff --git a/docs/theme.config.js b/docs/theme.config.js index 8534d8a8..dbc7c415 100644 --- a/docs/theme.config.js +++ b/docs/theme.config.js @@ -1,5 +1,6 @@ import { useConfig } from "nextra-theme-docs"; import React from "react"; +import { useRouter } from "next/router"; /* eslint sort-keys: error */ /** @@ -24,6 +25,26 @@ export default { ), }, + head: () => { + const { asPath, defaultLocale, locale } = useRouter(); + const { title } = useConfig(); + const url = + "https://starship.cosmology.tech/" + + (defaultLocale === locale ? asPath : `/${locale}${asPath}`); + + const _title = asPath !== "/" ? `${title} - Cosmology` : `${title}`; + return ( + <> + + + + {_title} + + ); + }, chat: { link: "https://discord.gg/6hy8KQ9aJY", }, diff --git a/examples/getting-started/README.md b/examples/getting-started/README.md index ccf525db..2fbdd7ea 100644 --- a/examples/getting-started/README.md +++ b/examples/getting-started/README.md @@ -4,7 +4,6 @@ Simple self-contained example to get started with Starship. ## TLDR ```bash -```bash cd getting-started/ # Install the starship instance and run port-forward