Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions nx-dev/feature-doc-viewer/src/lib/doc-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export function DocViewer({
widgetData: { githubStarsCount: number };
}): JSX.Element {
const router = useRouter();
const [currentPath, setCurrentPath] = useState<string>('');
const [basePath, setBasePath] = useState<string>('');
const [currentPath, setCurrentPath] = useState<string>(router.asPath);
const [basePath, setBasePath] = useState<string>(router.basePath);

useEffect(() => {
setCurrentPath(router.asPath);
Expand Down Expand Up @@ -91,8 +91,10 @@ export function DocViewer({
images: [
{
url: `https://nx.dev/images/open-graph/${currentPath
.replace('/', '')
.replace(/\//gi, '-')}.${
.split('#')[0]
.split('?')[0]
.replace(/^\//, '')
.replace(/\//g, '-')}.${
vm.mediaImage ? getExtension(vm.mediaImage) : 'jpg'
}`,
width: 1600,
Expand Down
4 changes: 2 additions & 2 deletions nx-dev/nx-dev/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export default function CustomApp({
'An AI-first build platform that connects everything from your editor to CI. Helping you deliver fast, without breaking things.',
images: [
{
url: 'https://nx.dev/images/nx-media.jpg',
url: 'https://nx.dev/socials/nx-media.png',
width: 800,
height: 421,
alt: 'Nx: Smart Repos · Fast Builds',
type: 'image/jpeg',
type: 'image/png',
},
],
siteName: 'Nx',
Expand Down
16 changes: 16 additions & 0 deletions nx-dev/nx-dev/pages/ai-chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ export default function AiDocs(): JSX.Element {
maxImagePreview: 'none',
maxVideoPreview: -1,
}}
openGraph={{
url: 'https://nx.dev/ai-chat',
title: 'Nx AI Chat',
description: 'AI chat powered by Nx docs.',
images: [
{
url: 'https://nx.dev/socials/nx-media.png',
width: 800,
height: 421,
alt: 'Nx: Smart Repos · Fast Builds',
type: 'image/png',
},
],
siteName: 'Nx',
type: 'website',
}}
/>
<div
id="shell"
Expand Down
4 changes: 2 additions & 2 deletions nx-dev/nx-dev/pages/changelog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ export default function Changelog(props: ChangeLogProps): JSX.Element {
description: 'Learn about all the changes',
images: [
{
url: 'https://nx.dev/images/nx-media.jpg',
url: 'https://nx.dev/socials/nx-media.png',
width: 800,
height: 421,
alt: 'Nx: Smart Repos · Fast Builds',
type: 'image/jpeg',
type: 'image/png',
},
],
siteName: 'Nx',
Expand Down
Loading