* wip * feat: add scalar api client * fix: pr feedback * feat: add scalar react client package, remove vueary * feat: add scalar proxy * Move dependencies to package * Format once * Rename prop * Use react context and simplify lazy loading * Add loading state * Format * Move styles * bun install * bun * fix: remove extraneous api-reference package * feat: make operation functional with spec in client * fix: column bug and http request type wrapping * fix: add scalar api reference package * Format * bun install * fix: scrolling in scalar modal * Lazy load operations data in component * fix: change dependency from api-reference to oas-utils to reduce size * bun install * Log error in the worker proxy * Cleanup * Comment "mode" * Without credentials and referrerPolicy --------- Co-authored-by: Samy Pessé <samypesse@gmail.com> Co-authored-by: Amrit <amrit@hockey-community.com>
GitBook
Next.js application to render GitBook published content.
Development
Start the local server
Clone the repository and use Bun to install dependencies and run the local development server.
bun install
Run the Next.js development server:
bun dev
Then open the space in your web browser, using http://localhost:3000/<host>/<path> (example: http://localhost:3000/docs.gitbook.com).
Other development commands
bun format: format the codebun lint: lint the code
Testing and CI
- Run unit tests with
bun unit. - Run E2E tests with
bun e2e(be sure to have your dev server running locally).
All pull-requests will be tested against both visual and performances testing to prevent regressions.
Self-hosting
This repository is designed to allow self-hosting the rendering of your GitBook published content. Self-hosting has pros and cons, on the pro side you can customize the look and feel and better embed your documentation in your application; on the cons side you become responsible for the reliability and keeping the renderer up-to-date with the changes on the GitBook platform.
This application can easily be configured and deployed on Vercel or Cloudflare to serve a specific space content (self-hosting). It requires a minimum amount of configuration:
GITBOOK_MODE=singleGITBOOK_SPACE_ID: ID of the GitBook.com space to renderGITBOOK_TOKEN: a GitBook.com API token that has access to the space defined inGITBOOK_SPACE_ID