Skip to content

Commit

Permalink
feat: Add custom domain support (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehesp authored Sep 23, 2024
1 parent 3a30856 commit b638b4f
Show file tree
Hide file tree
Showing 110 changed files with 1,002 additions and 1,252 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The repository is structured as follows:

- `api`: The API server which is served via `https://api.docs.page`. This is an express application which handles tasks such as fetching content from GitHub and markdown parsing.
- `og`: A Next.js application which serves the Open Graph images for documentation pages.
- `website`: A Remix application which serves the main `https://docs.page` website, and the documentation rendering for each repository.
- `website`: A Next.js application which serves the main `https://docs.page` website, and the documentation rendering for each repository.
- `packages/cli`: A CLI for running various commands and scripts for initialization, checking etc. Used locally and on CI environments.

## Running docs.page
Expand All @@ -21,6 +21,6 @@ Generally, you'll want to interface with the website and api. To run these concu
bun dev
```

This will start the website on `http://localhost:5173` and the api on `http://localhost:8080`.
This will start the website on `http://localhost:3000` and the api on `http://localhost:8080`.

> The API requires a `GITHUB_APP_ID` and `GITHUB_APP_PRIVATE_KEY` to be set in your environment. These are used to authenticate with the GitHub API. You can create a GitHub App in your GitHub account settings.
6 changes: 4 additions & 2 deletions api/src/config/v1.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ export const V1ConfigSchema = z
const config: Config = {
name: v1.name,
description: v1.description,
favicon: v1.favicon,
favicon: {
light: v1.favicon,
dark: v1.favicon,
},
socialPreview: v1.socialPreview,
logo: {
href: "/",
light: v1.logo,
dark: v1.logoDark,
},
Expand Down
Binary file modified bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions og/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"@types/react-dom": "18.0.10",
"@vercel/og": "^0.0.21",
"next": "13.1.0",
"react": "18.3.0-canary-bb0944fe5-20240313",
"react-dom": "18.2.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"typescript": "4.9.4"
}
}
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dev": "concurrently \"npm run dev:api\" \"npm run dev:website\"",
"dev:api": "cd api && bun dev",
"dev:website": "cd website && npm run dev",
"check": "npx @biomejs/biome check --write ."
"check": "bunx @biomejs/biome check --write ."
},
"dependencies": {
"typescript": "^5.5.3"
Expand All @@ -13,12 +13,7 @@
"@biomejs/biome": "1.8.3",
"concurrently": "^7.0.0"
},
"workspaces": [
"api",
"website",
"og",
"packages/*"
],
"workspaces": ["api", "website", "og", "packages/*"],
"patchedDependencies": {
"@remix-run/[email protected]": "patches/@remix-run%[email protected]"
}
Expand Down
36 changes: 33 additions & 3 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
node_modules
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

/.cache
# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build
.env

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
1 change: 0 additions & 1 deletion website/.npmrc

This file was deleted.

37 changes: 3 additions & 34 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,5 @@
# Welcome to Remix!
# docs.page

- 📖 [Remix docs](https://remix.run/docs)
This is the website for the docs.page project, which hosts both the docs.page website and the documentation for projects.

## Development

Run the dev server:

```shellscript
npm run dev
```

## Deployment

First, build your app for production:

```sh
npm run build
```

Then run the app in production mode:

```sh
npm start
```

Now you'll need to pick a host to deploy it to.

### DIY

If you're familiar with deploying Node applications, the built-in Remix app server is production-ready.

Make sure to deploy the output of `npm run build`

- `build/server`
- `build/client`
This project is a managed workspace using Bun - please see the contributing guide for more information and how to get started.
62 changes: 0 additions & 62 deletions website/app/components/DocSearch.tsx

This file was deleted.

71 changes: 0 additions & 71 deletions website/app/entry.client.tsx

This file was deleted.

89 changes: 0 additions & 89 deletions website/app/layouts/DocsLayout.tsx

This file was deleted.

Loading

0 comments on commit b638b4f

Please sign in to comment.