-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Dimitri POSTOLOV <[email protected]>
- Loading branch information
1 parent
7d48056
commit 38eaa1d
Showing
256 changed files
with
2,256 additions
and
2,225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,7 @@ | |
"eslint-plugin-tailwindcss": "npm:@hasparus/[email protected]", | ||
"fs-extra": "11.2.0", | ||
"graphql": "16.9.0", | ||
"gray-matter": "4.0.3", | ||
"jest-snapshot-serializer-raw": "2.0.0", | ||
"pg": "8.13.1", | ||
"prettier": "3.4.2", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ build | |
temp | ||
public/sitemap.xml | ||
public/changelog.json | ||
public/_pagefind/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { useHiveMDXComponents as useMDXComponents } from '@theguild/components/server'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
/// <reference types="next/navigation-types/compat/navigation" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. | ||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,36 +4,37 @@ | |
"private": true, | ||
"scripts": { | ||
"build": "next build && next-sitemap", | ||
"dev": "next", | ||
"dev": "next --turbopack", | ||
"postbuild": "pagefind --site .next/server/app --output-path out/_pagefind", | ||
"validate-mdx-links": "pnpx [email protected] --files 'src/**/*.mdx'" | ||
}, | ||
"dependencies": { | ||
"@radix-ui/react-accordion": "1.2.2", | ||
"@radix-ui/react-icons": "1.3.2", | ||
"@radix-ui/react-tabs": "1.1.2", | ||
"@radix-ui/react-tooltip": "1.1.6", | ||
"@tailwindcss/typography": "0.5.16", | ||
"@theguild/components": "7.6.3", | ||
"clsx": "2.1.1", | ||
"@theguild/components": "9.2.0", | ||
"date-fns": "4.1.0", | ||
"next": "14.2.23", | ||
"react": "18.3.1", | ||
"next": "15.1.0", | ||
"react": "19.0.0", | ||
"react-avatar": "5.0.3", | ||
"react-countup": "6.5.3", | ||
"react-dom": "18.3.1", | ||
"react-dom": "19.0.0", | ||
"react-icons": "5.4.0", | ||
"tailwind-merge": "2.6.0", | ||
"tailwindcss-animate": "1.0.7", | ||
"tailwindcss-radix": "3.0.5" | ||
"tailwind-merge": "2.6.0" | ||
}, | ||
"devDependencies": { | ||
"@tailwindcss/typography": "0.5.16", | ||
"@theguild/tailwind-config": "0.6.2", | ||
"@types/react": "18.3.18", | ||
"@types/rss": "^0.0.32", | ||
"next-sitemap": "4.2.3", | ||
"pagefind": "^1.2.0", | ||
"postcss": "8.4.49", | ||
"postcss-nesting": "^13.0.1", | ||
"rss": "1.2.2", | ||
"tailwindcss": "3.4.17" | ||
"tailwindcss": "3.4.17", | ||
"tailwindcss-animate": "1.0.7", | ||
"tailwindcss-radix": "3.0.5" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
import { ResolvingMetadata } from 'next'; | ||
import { generateStaticParamsFor, importPage } from 'nextra/pages'; | ||
import { NextPageProps } from '@theguild/components'; | ||
import { useMDXComponents } from '../../../../mdx-components.js'; | ||
import { ConfiguredGiscus } from '../../../components/configured-giscus'; | ||
|
||
export const generateStaticParams = generateStaticParamsFor('mdxPath'); | ||
|
||
export async function generateMetadata( | ||
props: NextPageProps<'...mdxPath'>, | ||
_parent: ResolvingMetadata, | ||
) { | ||
const { mdxPath } = await props.params; | ||
const { metadata } = await importPage(mdxPath); | ||
return { | ||
...metadata, | ||
...(mdxPath?.[0] === 'gateway' && { | ||
title: { absolute: `${metadata.title} | Hive Gateway` }, | ||
}), | ||
}; | ||
} | ||
|
||
const Wrapper = useMDXComponents().wrapper!; | ||
|
||
export default async function Page(props: NextPageProps<'...mdxPath'>) { | ||
const params = await props.params; | ||
const result = await importPage(params.mdxPath); | ||
const { default: MDXContent, toc, metadata } = result; | ||
return ( | ||
<Wrapper toc={toc} metadata={metadata}> | ||
<MDXContent {...props} params={params} /> | ||
<ConfiguredGiscus /> | ||
</Wrapper> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
'use client'; | ||
|
||
import { usePathname } from 'next/navigation'; | ||
import { normalizePages } from '@theguild/components'; | ||
|
||
function ensureAbsolute(url: string) { | ||
if (url.startsWith('/')) { | ||
return `https://the-guild.dev/graphql/hive${url.replace(/\/$/, '')}`; | ||
} | ||
|
||
return url; | ||
} | ||
|
||
type NormalizedResult = ReturnType<typeof normalizePages>; | ||
|
||
function createBreadcrumb(normalizedResult: NormalizedResult) { | ||
const activePaths = normalizedResult.activePath.slice(); | ||
|
||
if (activePaths[0]?.route !== '/') { | ||
// Add the home page to all pages except the home page | ||
activePaths.unshift({ | ||
route: '/', | ||
title: 'Hive', | ||
name: 'index', | ||
type: 'page', | ||
display: 'hidden', | ||
children: [], | ||
frontMatter: {}, | ||
}); | ||
} | ||
return { | ||
'@context': 'https://schema.org', | ||
'@type': 'BreadcrumbList', | ||
itemListElement: activePaths.map((path, index) => { | ||
return { | ||
'@type': 'ListItem', | ||
position: index + 1, | ||
name: path.route === '/' ? 'Hive' : path.title, | ||
item: ensureAbsolute(path.route), | ||
}; | ||
}), | ||
}; | ||
} | ||
|
||
export function DynamicMetaTags({ pageMap }: { pageMap: any[] }) { | ||
const pathname = usePathname()!; | ||
if (pathname === '/_not-found') { | ||
return; | ||
} | ||
const normalizePagesResult = normalizePages({ | ||
list: pageMap, | ||
route: pathname, | ||
}); | ||
return ( | ||
<script | ||
type="application/ld+json" | ||
id="breadcrumb" | ||
dangerouslySetInnerHTML={{ | ||
__html: JSON.stringify(createBreadcrumb(normalizePagesResult), null, 2), | ||
}} | ||
/> | ||
); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 7 additions & 2 deletions
9
...cs/src/components/ecosystem-page/page.tsx → packages/web/docs/src/app/ecosystem/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
Oops, something went wrong.