Skip to content

Commit 07911eb

Browse files
Link to proper /docs and remove Hive-specific links (#2818)
* Link to proper /docs and remove Hive-specific links * Update @theguild/components to fix developer menu * Update @theguild/components to fix sign in link * upd * try --------- Co-authored-by: Dimitri POSTOLOV <[email protected]>
1 parent eed453e commit 07911eb

File tree

5 files changed

+31
-44
lines changed

5 files changed

+31
-44
lines changed

pnpm-lock.yaml

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/app/layout.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ComponentPropsWithoutRef, FC, ReactNode } from 'react';
2-
import { Banner, PRODUCTS } from '@theguild/components';
2+
import { Banner, GitHubIcon, PaperIcon, PencilIcon, PRODUCTS, RightCornerIcon, TargetIcon } from '@theguild/components';
33
import { getDefaultMetadata, GuildLayout } from '@theguild/components/server';
44
import '@theguild/components/style.css';
55

@@ -47,6 +47,19 @@ const RootLayout: FC<{
4747
{ children: 'Rules', href: '/rules' },
4848
{ children: 'Playground', href: '/play' },
4949
],
50+
developerMenu: [
51+
{
52+
href: '/docs',
53+
icon: <PaperIcon />,
54+
children: 'Documentation',
55+
},
56+
{ href: 'https://the-guild.dev/blog', icon: <PencilIcon />, children: 'Blog' },
57+
{
58+
href: 'https://github.com/dimaMachina/graphql-eslint',
59+
icon: <GitHubIcon />,
60+
children: 'GitHub',
61+
},
62+
]
5063
}}
5164
>
5265
{children}

website/mdx-components.tsx

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import fs from 'node:fs/promises';
22
import path from 'node:path';
3-
import { addBasePath } from 'next/dist/client/add-base-path';
43
import {
54
compileMdx,
65
useMDXComponents as getDocsMDXComponents,
@@ -67,29 +66,6 @@ ${legacyConfig}`)}
6766
/>
6867
);
6968
},
70-
async source({ src, type, ...props }) {
71-
if (!src) {
72-
throw new Error('Must provide `src` prop');
73-
}
74-
if (src.startsWith('/')) {
75-
const filePath = path.join(process.cwd(), 'public', src);
76-
try {
77-
await fs.access(filePath);
78-
} catch (error) {
79-
const relativePath = path.relative(process.cwd(), filePath);
80-
if ((error as any).code === 'ENOENT') {
81-
throw new Error(`File doesn't exist: ${relativePath}`);
82-
}
83-
throw new Error(`Error checking file: ${relativePath}`);
84-
}
85-
}
86-
87-
let ext = path.extname(src).slice(1); // remove dot;
88-
if (ext === 'mov') {
89-
ext = 'quicktime';
90-
}
91-
return <source {...props} src={addBasePath(src)} type={type || `video/${ext}`} />;
92-
},
9369
});
9470

9571
export const useMDXComponents: typeof getDocsMDXComponents = components => ({

website/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@monaco-editor/react": "^4.6.0",
1717
"@radix-ui/react-icons": "^1.3.0",
1818
"@radix-ui/react-select": "^2.0.0",
19-
"@theguild/components": "8.0.0-alpha-20241120035725-2b8cadd078ebc2ace612021973b3e50944386052",
19+
"@theguild/components": "8.0.0-alpha-20241205144621-2f6170e406a6235f71ab4756e1dd369735420a88",
2020
"clsx": "^2.0.0",
2121
"graphql": "^16.9.0",
2222
"lodash.debounce": "^4.0.8",
@@ -30,7 +30,7 @@
3030
},
3131
"devDependencies": {
3232
"@svgr/webpack": "^8.1.0",
33-
"@theguild/tailwind-config": "0.6.0",
33+
"@theguild/tailwind-config": "0.6.1",
3434
"@types/lodash.debounce": "4.0.9",
3535
"@types/lodash.uniqwith": "4.5.9",
3636
"@types/node": "22.10.1",

website/tailwind.config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import tailwindConfig from '@theguild/tailwind-config';
33

44
export default {
55
...tailwindConfig,
6-
// todo: add to shared config
7-
content: [...tailwindConfig.content, './content/**/*.{md,mdx}'],
86
// @ts-expect-error -- fixme
9-
plugins: [tailwindRadix()],
7+
plugins: [...tailwindConfig.plugins, tailwindRadix()],
108
};

0 commit comments

Comments
 (0)