├── README.md ├── .prettierignore ├── .husky └── pre-commit ├── .gitignore ├── .npmrc ├── website ├── tailwind.config.cjs ├── postcss.config.js ├── src │ ├── pages │ │ ├── docs │ │ │ ├── import.mdx │ │ │ ├── meta.json │ │ │ ├── mermaid.mdx │ │ │ ├── remote.mdx │ │ │ └── index.mdx │ │ ├── 404.mdx │ │ ├── 500.mdx │ │ ├── meta.json │ │ ├── _app.tsx │ │ └── index.mdx │ └── reused.mdx ├── public │ └── assets │ │ ├── subheader-logo.png │ │ └── subheader-logo.svg ├── next.config.mjs ├── next-env.d.ts ├── tsconfig.json ├── package.json └── theme.config.tsx ├── packages ├── docs │ ├── src │ │ ├── index.ts │ │ ├── env.d.ts │ │ ├── types.ts │ │ ├── style.css │ │ ├── mermaid.tsx │ │ ├── utils.ts │ │ ├── next.config.ts │ │ ├── underscore-redirects.ts │ │ ├── giscus.tsx │ │ ├── google-analytics.tsx │ │ ├── remark-mermaid.ts │ │ ├── next-nprogress.tsx │ │ └── npm.ts │ ├── package.json │ └── CHANGELOG.md └── algolia │ ├── src │ ├── types.ts │ └── index.ts │ ├── CHANGELOG.md │ └── package.json ├── prettier.config.cjs ├── .vscode └── settings.json ├── renovate.json ├── .github └── workflows │ ├── release.yaml │ ├── pr.yaml │ ├── test.yaml │ └── nextjs_bundle_analysis.yml ├── scripts └── copy-files.mjs ├── .changeset ├── README.md └── config.json ├── tsconfig.json ├── package.json └── .eslintrc.cjs /README.md: -------------------------------------------------------------------------------- 1 | # guild-docs 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .husky/_/ 2 | dist/ 3 | .next/ 4 | .bob/ 5 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | *.log 3 | .next/ 4 | dist 5 | .env 6 | .idea/ 7 | .bob/ 8 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | workspace-concurrency=Infinity 2 | stream=true 3 | node-linker=hoisted 4 | -------------------------------------------------------------------------------- /website/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = require('@theguild/tailwind-config'); 2 | -------------------------------------------------------------------------------- /packages/docs/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './google-analytics.js'; 2 | export * from './utils.js'; 3 | -------------------------------------------------------------------------------- /website/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = require('@theguild/tailwind-config/postcss.config'); 2 | -------------------------------------------------------------------------------- /prettier.config.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | module.exports = require('@theguild/prettier-config'); 3 | -------------------------------------------------------------------------------- /website/src/pages/docs/import.mdx: -------------------------------------------------------------------------------- 1 | import ReusedContent from '../../reused.mdx' 2 | 3 | # Import Support 4 | 5 | 6 | -------------------------------------------------------------------------------- /website/public/assets/subheader-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-guild-org/the-guild-docs/HEAD/website/public/assets/subheader-logo.png -------------------------------------------------------------------------------- /website/src/pages/404.mdx: -------------------------------------------------------------------------------- 1 | import { NotFoundPage } from '@theguild/components' 2 | 3 | # 404 - This page could not be found 4 | 5 | 6 | -------------------------------------------------------------------------------- /website/src/pages/docs/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": "Installation", 3 | "import": "Import", 4 | "mermaid": "Mermaid", 5 | "remote": "Remote MDX" 6 | } 7 | -------------------------------------------------------------------------------- /website/src/pages/500.mdx: -------------------------------------------------------------------------------- 1 | import { ServerSideErrorPage } from '@theguild/components' 2 | 3 | # 500 - Internal Server Error 4 | 5 | 6 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.tsdk": "node_modules/typescript/lib", 3 | "editor.formatOnSave": true, 4 | "editor.defaultFormatter": "esbenp.prettier-vscode" 5 | } 6 | -------------------------------------------------------------------------------- /website/next.config.mjs: -------------------------------------------------------------------------------- 1 | import { withGuildDocs } from 'guild-docs/next.config'; 2 | 3 | export default withGuildDocs({ 4 | eslint: { 5 | ignoreDuringBuilds: true, 6 | }, 7 | }); 8 | -------------------------------------------------------------------------------- /packages/docs/src/env.d.ts: -------------------------------------------------------------------------------- 1 | declare module '@next/bundle-analyzer' { 2 | import type { NextConfig } from 'next'; 3 | export default function nextBundleAnalyzer(config: { enabled: boolean }): (nextConfig: NextConfig) => NextConfig; 4 | } 5 | -------------------------------------------------------------------------------- /website/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /packages/docs/src/types.ts: -------------------------------------------------------------------------------- 1 | import type { DefaultSeoProps, OpenGraphMedia } from 'next-seo/lib/types'; 2 | 3 | export interface AppSeoProps extends DefaultSeoProps { 4 | title: string; 5 | description: string; 6 | logo: OpenGraphMedia; 7 | } 8 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": ["github>the-guild-org/shared-config:renovate"], 4 | "rangeStrategy": "bump", 5 | "ignoreDeps": ["mermaid", "mdx-mermaid"], 6 | "ignorePaths": ["**/node_modules/**"] 7 | } 8 | -------------------------------------------------------------------------------- /website/src/reused.mdx: -------------------------------------------------------------------------------- 1 | Some reused content 2 | 3 | ```ts 4 | console.log('Hello world') 5 | ``` 6 | 7 | ## Reused table 8 | 9 | | Beep | No. | Boop | 10 | | :--- | :----: | -----: | 11 | | beep | 1024 | xyz | 12 | | boop | 338845 | tuv | 13 | | foo | 10106 | qrstuv | 14 | | bar | 45 | lmno | 15 | -------------------------------------------------------------------------------- /packages/docs/src/style.css: -------------------------------------------------------------------------------- 1 | @import 'nextra-theme-docs/style.css'; 2 | @import 'tailwindcss/components'; 3 | @import 'tailwindcss/utilities'; 4 | @import '@algolia/autocomplete-theme-classic'; 5 | @import '@theguild/components/dist/search-bar-v2.css'; 6 | 7 | /* quick fix for menu on mobile */ 8 | div[class='hidden md:inline-block min-w-[200px]'] { 9 | position: absolute; 10 | } 11 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | paths-ignore: 6 | - 'examples/**' 7 | - '.vscode/**' 8 | - '.husky/**' 9 | branches: 10 | - main 11 | 12 | jobs: 13 | stable: 14 | uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main 15 | with: 16 | releaseScript: release 17 | nodeVersion: 18 18 | secrets: 19 | githubToken: ${{ secrets.GITHUB_TOKEN }} 20 | npmToken: ${{ secrets.NPM_TOKEN }} 21 | -------------------------------------------------------------------------------- /scripts/copy-files.mjs: -------------------------------------------------------------------------------- 1 | import path from 'node:path'; 2 | import fs from 'node:fs/promises'; 3 | 4 | const CWD = process.cwd(); 5 | 6 | const promises = [path.join(CWD, 'packages/docs/src/style.css')].map(async filePath => { 7 | const content = await fs.readFile(filePath); 8 | const newFilePath = filePath.replace('/src/', '/dist/'); 9 | 10 | await fs.writeFile(newFilePath, content); 11 | console.log('✅', path.relative(CWD, newFilePath), 'copied!'); 12 | }); 13 | 14 | await Promise.all(promises); 15 | -------------------------------------------------------------------------------- /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.1.0/schema.json", 3 | "changelog": ["@changesets/changelog-github", { "repo": "the-guild-org/the-guild-docs" }], 4 | "commit": false, 5 | "access": "public", 6 | "baseBranch": "main", 7 | "updateInternalDependencies": "patch", 8 | "ignore": ["website"], 9 | "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { 10 | "onlyUpdatePeerDependentsWhenOutOfRange": true 11 | }, 12 | "snapshot": { 13 | "useCalculatedVersion": true, 14 | "prereleaseTemplate": "{tag}-{datetime}-{commit}" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.github/workflows/pr.yaml: -------------------------------------------------------------------------------- 1 | name: PR 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | dependencies: 10 | uses: the-guild-org/shared-config/.github/workflows/changesets-dependencies.yaml@main 11 | secrets: 12 | githubToken: ${{ secrets.GITHUB_TOKEN }} 13 | 14 | canary: 15 | uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main 16 | with: 17 | npmTag: alpha 18 | buildScript: build 19 | nodeVersion: 18 20 | secrets: 21 | githubToken: ${{ secrets.GITHUB_TOKEN }} 22 | npmToken: ${{ secrets.NPM_TOKEN }} 23 | -------------------------------------------------------------------------------- /website/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2019", 4 | "module": "commonjs", 5 | "strict": true, 6 | "esModuleInterop": true, 7 | "skipLibCheck": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "lib": ["dom", "dom.iterable", "esnext"], 10 | "allowJs": true, 11 | "noEmit": true, 12 | "moduleResolution": "node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "jsx": "preserve", 16 | "incremental": true 17 | }, 18 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], 19 | "exclude": ["node_modules"] 20 | } 21 | -------------------------------------------------------------------------------- /website/src/pages/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": { 3 | "title": "Home", 4 | "type": "page", 5 | "theme": { 6 | "layout": "raw" 7 | } 8 | }, 9 | "docs": { 10 | "title": "Docs", 11 | "type": "page", 12 | "theme": { 13 | "toc": true 14 | } 15 | }, 16 | "contact-us-link": { 17 | "title": "Contact Us", 18 | "type": "page", 19 | "href": "https://the-guild.dev/contact", 20 | "newWindow": true 21 | }, 22 | "404": { 23 | "type": "page", 24 | "theme": { 25 | "layout": "full" 26 | } 27 | }, 28 | "500": { 29 | "type": "page", 30 | "theme": { 31 | "layout": "full" 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /website/src/pages/docs/mermaid.mdx: -------------------------------------------------------------------------------- 1 | # Mermaid Support 2 | 3 | ```mermaid 4 | graph TD; 5 | subgraph AA [Consumers] 6 | A[Mobile app]; 7 | B[Web app]; 8 | C[Node.js client]; 9 | end 10 | subgraph BB [Services] 11 | E[REST API]; 12 | F[GraphQL API]; 13 | G[SOAP API]; 14 | end 15 | Z[GraphQL API]; 16 | A --> Z; 17 | B --> Z; 18 | C --> Z; 19 | Z --> E; 20 | Z --> F; 21 | Z --> G; 22 | ``` 23 | 24 | ### How to use 25 | 26 | ````mdx filename="my-page.mdx" 27 | ```mermaid 28 | graph TD; 29 | subgraph AA [Consumers] 30 | A[Mobile app]; 31 | B[Web app]; 32 | C[Node.js client]; 33 | end 34 | subgraph BB [Services] 35 | E[REST API]; 36 | F[GraphQL API]; 37 | G[SOAP API]; 38 | end 39 | Z[GraphQL API]; 40 | A --> Z; 41 | B --> Z; 42 | C --> Z; 43 | Z --> E; 44 | Z --> F; 45 | Z --> G; 46 | ``` 47 | ```` 48 | -------------------------------------------------------------------------------- /website/src/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { AppProps } from 'next/app'; 3 | import { Header, Footer, ThemeProvider } from '@theguild/components'; 4 | import 'guild-docs/style.css'; 5 | 6 | export default function App({ Component, pageProps }: AppProps): ReactElement { 7 | return ( 8 | 9 |
10 | 11 |