diff --git a/docs/_website/docusaurus.config.js b/docs/_website/docusaurus.config.js index 1d0c8c0cb7..23ea6fb18b 100644 --- a/docs/_website/docusaurus.config.js +++ b/docs/_website/docusaurus.config.js @@ -109,14 +109,11 @@ module.exports = { colorMode: { disableSwitch: true, }, - googleAnalytics: { - trackingID: 'UA-170615678-4', - anonymizeIP: true, - }, algolia : { // This is a read-only, search-only key served directly by the front-end, managed by Algolia via their // free DocSearch program. The key is not sensitive. See https://docsearch.algolia.com/ for more details. - apiKey: '32f1f7956b3d2c3c90fbe259c7901d94', + apiKey: 'e9fd4dc1b48bb4b9e8763d3adc9df6d1', + appId: 'XFPMTG0051', indexName: 'lyft_clutch', }, prism : { @@ -221,6 +218,10 @@ module.exports = { path: "generated/docs", sidebarPath: require.resolve('../sidebars.json'), }, + googleAnalytics: { + trackingID: 'UA-170615678-4', + anonymizeIP: true, + }, blog: { path: "generated/blog", blogTitle: 'Clutch Open-source Developer Blog', diff --git a/docs/_website/netlify.toml b/docs/_website/netlify.toml index a6f5f7676b..d1c4a32c93 100644 --- a/docs/_website/netlify.toml +++ b/docs/_website/netlify.toml @@ -3,4 +3,4 @@ ignore = "/bin/false" [build.environment] - NODE_VERSION = "14" \ No newline at end of file + NODE_VERSION = "16" \ No newline at end of file diff --git a/docs/_website/package.json b/docs/_website/package.json index ea1170e365..5677dca033 100644 --- a/docs/_website/package.json +++ b/docs/_website/package.json @@ -39,5 +39,8 @@ "chokidar": "^3.5.1", "react-tiny-popover": "^7.0.0", "typescript": "^4.1.3" + }, + "engines": { + "node": ">=16.0.0 <17" } } diff --git a/docs/_website/src/components/Share/index.tsx b/docs/_website/src/components/Share/index.tsx index c831086785..04ebb9052c 100644 --- a/docs/_website/src/components/Share/index.tsx +++ b/docs/_website/src/components/Share/index.tsx @@ -45,9 +45,10 @@ interface ShareProps { url: string; twitter_username?: string; }[]; + style: {[key: string]: unknown} } -const Share = ({title, authors}: ShareProps) => { +const Share = ({ title, authors, style }: ShareProps) => { const [open, setOpen] = React.useState(false); return ( diff --git a/docs/_website/src/pages/docs/index.js b/docs/_website/src/pages/docs/index.tsx similarity index 100% rename from docs/_website/src/pages/docs/index.js rename to docs/_website/src/pages/docs/index.tsx diff --git a/docs/_website/src/theme/BlogPostItem/index.tsx b/docs/_website/src/theme/BlogPostItem/index.tsx index a7e2ffc6b0..aba5dab35e 100644 --- a/docs/_website/src/theme/BlogPostItem/index.tsx +++ b/docs/_website/src/theme/BlogPostItem/index.tsx @@ -1,7 +1,9 @@ import React from 'react'; import clsx from 'clsx'; import { MDXProvider } from '@mdx-js/react'; -import Seo from '@theme/Seo'; +import { PageMetadata } from '@docusaurus/theme-common'; +// @ts-ignore +import { useBlogPost } from '@docusaurus/theme-common/internal'; import Link from '@docusaurus/Link'; import MDXComponents from '@theme/MDXComponents'; import Share from '@site/src/components/Share'; @@ -23,15 +25,11 @@ const MONTHS = [ ]; function BlogPostItem(props) { - const { - children, - frontMatter, - metadata, - truncated, - isBlogPostPage = false, - } = props; - const { date, permalink, tags, readingTime } = metadata; - const { authors, title, image, keywords } = frontMatter; + const { children } = props; + const post = useBlogPost() + const isBlogPostPage = post.isBlogPostPage; + const { date, permalink, tags, readingTime, hasTruncateMarker } = post.metadata; + const { authors, title, image, keywords } = post.frontMatter; const renderPostHeader = () => { const TitleHeading = isBlogPostPage ? 'h1' : 'h2'; @@ -51,7 +49,7 @@ function BlogPostItem(props) { {month} {day}, {year}{' '} {readingTime && <> · {Math.ceil(readingTime)} min read} - {!truncated && <> · } + {isBlogPostPage && <> · } @@ -83,14 +81,14 @@ function BlogPostItem(props) { return ( - +
{renderPostHeader()}
{children}
- {(tags.length > 0 || truncated) && ( + {(tags.length > 0 || hasTruncateMarker) && (