This document provides instructions on how to set up and start a running instance of talawa-docs on your local system. The instructions are written to be followed in sequence so make sure to go through each of them step by step without skipping any sections.
The contents of the talawa-docs repo is used to automatically create the talawa-docs Documentation website. The automation uses Docusaurus, a modern static website generator.
We recommend that you follow these steps before beginning development work in this repository.
For the package installation use pnpm. The steps are simple:
- Validate the
pnpminstallation on your local device by running the following command. You should get thepnpmversion.
$ pnpm -version
- If you get an error, then you'll need to install
pnpm. A simple way to do this use fnm.
From the talawa-docs/docs directory, run the following command.
$ pnpm add docusaurus
$ pnpm installTo preview your changes as you edit the files, you can run a local development server that will serve your website and it will reflect the latest changes.
The command to run the server is:
$ pnpm run start
OR
$ pnpm startBy default, a browser window will open at http://localhost:3000.
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
In most cases is unnecessary. Running the development server will be sufficient.
If you need to generate static HTML pages (unlikely), then follow these steps.
$ pnpm run buildThis command generates static content into the /build directory and can be served using any static contents hosting service.