File tree 3 files changed +51
-0
lines changed
packages/components/src/server
3 files changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @theguild/components " : patch
3
+ ---
4
+
5
+ Export sharedMetaItems for meta.ts files
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ export { fetchFilePathsFromGitHub } from 'nextra/fetch-filepaths-from-github';
7
7
export { compileMdx } from 'nextra/compile' ;
8
8
export { getPageMap , createIndexPage } from 'nextra/page-map' ;
9
9
export { fetchPackageInfo } from './npm.js' ;
10
+ export { sharedMetaItems } from './shared-meta-items' ;
10
11
11
12
/**
12
13
* Contain `getPageMap` import which imports `metadata` from pages, in case importing from
Original file line number Diff line number Diff line change
1
+ import { PRODUCTS_MENU_LIST , ProductType } from '../products' ;
2
+
3
+ export function sharedMetaItems ( options : { githubUrl : string ; product : ProductType } ) {
4
+ return {
5
+ products : {
6
+ title : 'Products' ,
7
+ type : 'menu' ,
8
+ items : PRODUCTS_MENU_LIST ,
9
+ } ,
10
+ ecosystem : {
11
+ title : 'Ecosystem' ,
12
+ type : 'page' ,
13
+ ...( options . product !== 'HIVE' && { href : 'https://the-guild.dev/graphql/hive/ecosystem' } ) ,
14
+ } ,
15
+ blog : {
16
+ title : 'Blog' ,
17
+ type : 'page' ,
18
+ href : 'https://the-guild.dev/blog' ,
19
+ } ,
20
+ github : {
21
+ title : 'GitHub' ,
22
+ type : 'page' ,
23
+ href : options . githubUrl ,
24
+ } ,
25
+ 'the-guild' : {
26
+ title : 'The Guild' ,
27
+ type : 'menu' ,
28
+ items : {
29
+ 'about-us' : {
30
+ title : 'About Us' ,
31
+ href : 'https://the-guild.dev/about-us' ,
32
+ } ,
33
+ 'brand-assets' : {
34
+ title : 'Brand Assets' ,
35
+ href : 'https://the-guild.dev/logos' ,
36
+ } ,
37
+ } ,
38
+ } ,
39
+ 'graphql-foundation' : {
40
+ title : 'GraphQL Foundation' ,
41
+ type : 'page' ,
42
+ href : 'https://graphql.org/community/foundation' ,
43
+ } ,
44
+ } ;
45
+ }
You can’t perform that action at this time.
0 commit comments