Skip to content

Commit

Permalink
feat(docs): theme updates (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
tknickman committed Oct 20, 2022
1 parent 1567203 commit 57ce139
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions docs/theme.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import Navigation from "./components/Navigation";
import HeaderLogo from "./components/HeaderLogo";
import { Discord, Github } from "./components/Social";

const SITE_ROOT = "https://turbo.build";

/**
* @type {import('nextra-theme-docs').DocsThemeConfig}
*/
Expand All @@ -16,7 +18,7 @@ const theme = {
icon: Discord,
},
docsRepositoryBase: "https://github.com/vercel/turbo/blob/main/docs",
titleSuffix: " | Turb",
titleSuffix: " | Turbo",
unstable_flexsearch: true,
unstable_staticImage: true,
toc: {
Expand All @@ -32,9 +34,7 @@ const theme = {
const router = useRouter();
const { frontMatter, title } = useConfig();
const fullUrl =
router.asPath === "/"
? "https://turborepo.org"
: `https://turborepo.org${router.asPath}`;
router.asPath === "/" ? SITE_ROOT : `${SITE_ROOT}${router.asPath}`;
return (
<>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand Down Expand Up @@ -73,18 +73,14 @@ const theme = {
<link rel="canonical" href={fullUrl} />
<meta
property="twitter:image"
content={`https://turborepo.org${
frontMatter.ogImage ?? "/og-image.png"
}`}
content={`${SITE_ROOT}${frontMatter.ogImage ?? "/og-image.png"}`}
/>
<meta
property="og:image"
content={`https://turborepo.org${
frontMatter.ogImage ?? "/og-image.png"
}`}
content={`${SITE_ROOT}${frontMatter.ogImage ?? "/og-image.png"}`}
/>
<meta property="og:locale" content="en_IE" />
<meta property="og:site_name" content="Turborepo" />
<meta property="og:site_name" content="Turbo" />
</>
);
},
Expand Down

0 comments on commit 57ce139

Please sign in to comment.