Skip to content

Travelgate/documentation

Repository files navigation

Travelgate Documenation

This website is built using Docusaurus 3

Requirements

  • Node.js version 18 or above

Installation

$ npm install

Generate GraphQL API reference

npx docusaurus graphql-to-doc

The GraphQL API reference is generated from the TravelgateX GraphQL schema but the sidebar-schema.js needs to be updated. Copy + paste the following code in your api/sidebar-schema.js file:

/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */

module.exports = {
    schemaSidebar: [
        {
            type: "autogenerated",
            dirName: ".",
        },
    ],
};

Local Development

$ npm run start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build (optional)

$ npm run build

This command generates static content into the build directory and can be served using any static contents hosting service.

Test .mdx structure before commit/push

npx docusaurus-mdx-checker

Deployment

This repository is being automatically deployed to GitHub Pages using GitHub Actions. The deployment script is located in .github/workflows/main.yml.