@graphcommerce/docs 3.1.4 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/{content/framework → framework}/deployment.md +10 -6
  3. package/{content/framework → framework}/environment-variables.md +0 -0
  4. package/{content/framework → framework}/favicon.md +3 -1
  5. package/{content/framework → framework}/graphcms.md +10 -4
  6. package/{content/framework → framework}/icons.md +0 -0
  7. package/{content/framework → framework}/readme.md +0 -0
  8. package/{content/framework → framework}/seo.md +0 -0
  9. package/{content/framework → framework}/static-file-serving.md +0 -0
  10. package/{content/framework → framework}/static-generation.md +0 -0
  11. package/{content/framework → framework}/theming.md +1 -1
  12. package/{content/framework → framework}/translations.md +3 -1
  13. package/{content/framework → framework}/troubleshooting.md +0 -0
  14. package/{content/framework → framework}/typography.md +0 -0
  15. package/{content/getting-started → getting-started}/create.md +7 -3
  16. package/{content/getting-started → getting-started}/graphcms-component.md +30 -10
  17. package/{content/getting-started → getting-started}/header.md +17 -7
  18. package/{content/getting-started → getting-started}/pages.md +12 -4
  19. package/{content/getting-started → getting-started}/readme.md +3 -2
  20. package/{content/getting-started → getting-started}/start-building.md +2 -2
  21. package/{content/getting-started → getting-started}/vscode.md +0 -0
  22. package/package.json +6 -51
  23. package/{content/readme.md → readme.md} +1 -1
  24. package/{content/roadmap.md → roadmap.md} +0 -0
  25. package/.babelrc +0 -4
  26. package/components/Layout/LayoutFull.tsx +0 -85
  27. package/components/Layout/Logo.tsx +0 -19
  28. package/components/Layout/graphcommerce.svg +0 -34
  29. package/components/Search.tsx +0 -37
  30. package/components/SearchForm.tsx +0 -110
  31. package/components/SidebarMenu/index.tsx +0 -101
  32. package/components/prism.css +0 -274
  33. package/components/rehype-prism-plus.css +0 -49
  34. package/components/theme.ts +0 -410
  35. package/lib/DocumentIndexer.ts +0 -59
  36. package/lib/files.ts +0 -168
  37. package/lib/instantSearch.ts +0 -26
  38. package/lib/typesense/IndexerHandler.ts +0 -47
  39. package/lib/typesense/Leaves.ts +0 -37
  40. package/lib/typesense/SearchIndexer.ts +0 -64
  41. package/lib/typesense/batchInterable.ts +0 -13
  42. package/lib/typesense/createInstantSearchProps.ts +0 -36
  43. package/lib/typesense/typesenseClientConf.ts +0 -23
  44. package/lib/typesense/typesenseIndexerHandler.ts +0 -23
  45. package/next-env.d.ts +0 -5
  46. package/next.config.js +0 -21
  47. package/pages/[[...url]].tsx +0 -391
  48. package/pages/_app.tsx +0 -26
  49. package/pages/_document.tsx +0 -22
  50. package/pages/api/reindex.ts +0 -4
  51. package/pages/menu/[[...url]].tsx +0 -69
  52. package/public/apple-touch-icon.png +0 -0
  53. package/public/favicon.ico +0 -0
  54. package/public/favicon.svg +0 -12
  55. package/public/link.svg +0 -4
  56. package/public/manifest/favicon-192.png +0 -0
  57. package/public/manifest/favicon-512.png +0 -0
  58. package/public/manifest.webmanifest +0 -20
@@ -1,69 +0,0 @@
1
- import { PageOptions } from '@graphcommerce/framer-next-pages'
2
- import { LayoutOverlay, LayoutOverlayProps, PageMeta } from '@graphcommerce/next-ui'
3
- import { GetStaticPaths, GetStaticProps } from 'next'
4
- import { useRouter } from 'next/router'
5
- import { Search } from '../../components/Search'
6
- import SidebarMenu from '../../components/SidebarMenu'
7
- import {
8
- FileNode,
9
- getDirectoryPaths,
10
- getDirectoryTree,
11
- getFileContents,
12
- urlToPath,
13
- } from '../../lib/files'
14
-
15
- type Props = { menuData: FileNode } & LayoutOverlayProps
16
- type Param = { url: string[] }
17
-
18
- export default function MenuPage(props: Props) {
19
- const { menuData } = props
20
- const url = (useRouter().query.url as Param['url'] | undefined)?.join('/') ?? ''
21
-
22
- return (
23
- <>
24
- <PageMeta title='GraphCommerce Documentation' />
25
- <Search />
26
- <SidebarMenu {...menuData} selected={`/${url}`} />
27
- </>
28
- )
29
- }
30
-
31
- const pageOptions: PageOptions<LayoutOverlayProps> = {
32
- Layout: (props: LayoutOverlayProps) => (
33
- <LayoutOverlay
34
- {...props}
35
- variantSm='bottom'
36
- variantMd='left'
37
- sizeMd='floating'
38
- sizeSm='floating'
39
- justifySm='start'
40
- justifyMd='start'
41
- />
42
- ),
43
- overlayGroup: 'menu',
44
- }
45
- MenuPage.pageOptions = pageOptions
46
-
47
- export const getStaticPaths: GetStaticPaths<{ url: string[] }> = async () => {
48
- const paths = await getDirectoryPaths('content')
49
-
50
- return {
51
- fallback: 'blocking',
52
- paths: paths.map((p) => ({ params: { url: p.split('/') } })),
53
- }
54
- }
55
-
56
- export const getStaticProps: GetStaticProps<Props, Param> = async ({ params }) => {
57
- const url = params?.url ?? []
58
- const menuData = await getDirectoryTree('content')
59
- if (!menuData) return { notFound: true }
60
-
61
- const filePath = urlToPath(url, menuData)
62
- if (!filePath) return { notFound: true }
63
-
64
- const res = await getFileContents('content', filePath)
65
-
66
- if (res === false) return { notFound: true }
67
-
68
- return { props: { menuData } }
69
- }
Binary file
Binary file
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="120px" height="120px" viewBox="0 0 120 120" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <title>favicon</title>
4
- <g id="favicon" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
- <g id="Path" transform="translate(17.000000, 10.000000)">
6
- <polygon fill="#000000" fill-rule="nonzero" opacity="0.200000003" points="42.81 50 9.46 69.47 9.46 69.47 9.46 69.47 9.46 69.48 9.46 69.48 42.81 88.95 76.16 69.47"></polygon>
7
- <polygon fill="#000000" fill-rule="nonzero" opacity="0.400000006" points="42.81 31.55 9.46 51.02 9.46 51.02 9.46 51.02 9.46 51.03 9.46 51.03 42.81 70.5 76.16 51.02"></polygon>
8
- <polygon fill="#000000" fill-rule="nonzero" points="42.81 11.05 9.46 30.52 9.46 30.52 9.46 30.52 9.46 30.53 9.46 30.53 42.81 50 76.16 30.52"></polygon>
9
- <polygon stroke="#000000" stroke-width="5" points="0 25 0 75 42.81 100 85.62 75 85.62 25 42.81 0"></polygon>
10
- </g>
11
- </g>
12
- </svg>
package/public/link.svg DELETED
@@ -1,4 +0,0 @@
1
- <?xml version="1.0"?>
2
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
3
- <path d="M15.387 4.33c-2.1 0-3.6 1.9-5.1 3.3.2 0 .5-.1.8-.1.5 0 1 .1 1.5.3.8-.8 1.6-1.7 2.8-1.7.6 0 1.3.3 1.8.7 1 1 1 2.6 0 3.6l-2.6 2.6c-.4.4-1.2.7-1.8.7-1.4 0-2.1-.9-2.6-2l-1.3 1.3c.8 1.5 2 2.6 3.8 2.6 1.2 0 2.3-.5 3-1.3l2.6-2.6c.9-.9 1.5-2 1.5-3.3-.2-2.2-2.2-4.1-4.4-4.1zm-4.3 12.1l-.9.9c-.4.4-1.2.7-1.8.7-.6 0-1.3-.3-1.8-.7-1-1-1-2.7 0-3.6l2.6-2.6c.4-.4 1.2-.7 1.8-.7 1.4 0 2.1 1 2.6 2l1.3-1.3c-.8-1.5-2-2.6-3.8-2.6-1.2 0-2.3.5-3 1.3l-2.6 2.6c-1.7 1.7-1.7 4.4 0 6 1.6 1.6 4.4 1.7 5.9 0l1.9-1.9c-.3.1-.6.1-.9.1-.5 0-.9 0-1.3-.2z"/>
4
- </svg>
Binary file
Binary file
@@ -1,20 +0,0 @@
1
- {
2
- "name": "GraphCommerce",
3
- "short_name": "GraphCommerce",
4
- "display": "standalone",
5
- "theme_color": "#000000",
6
- "background_color": "#FFFFFF",
7
- "start_url": "/",
8
- "icons": [
9
- {
10
- "src": "/manifest/favicon-192.png",
11
- "sizes": "192x192",
12
- "type": "image/png"
13
- },
14
- {
15
- "src": "/manifest/favicon-512.png",
16
- "sizes": "512x512",
17
- "type": "image/png"
18
- }
19
- ]
20
- }