Skip to main content

Updating documentation

For large functionality changes, please remember to update mephisto.ai documentation.

We use Docusaurus package to make Markdown docs available on the web.

Run locally in development mode

To run Mephisto docs on your local machine for development (with Docker), run these commands:

docker-compose -f docker/docker-compose.dev.yml up
docker exec -it mephisto_dc bash
mephisto scripts local_db auto_generate_all_docs_reference_md
cd /mephisto/docs/web/

yarn
yarn install
yarn start-dev:docker

# or

npm install
npm run start-dev:docker

Then run mephisto scripts local_db auto_generate_all_docs_reference_md to auto-generate .md files in docs/web/docs/reference directory. (They will describe parameters of some Python classes.) Noe that on production this command is called by Github Actions.

You will now be able to access docs in the browser on http://localhost:3001/ with live updates after each saving files from docs.

NOTE: search will not be available in development mode. If you need to use search, stop development server and use production instruction below

Run locally in production mode

To test search or whether it will work on production, build and run production server. Sometimes development server do not raise exceptions which production one can.

docker-compose -f docker/docker-compose.dev.yml up
docker exec -it mephisto_dc bash
cd /mephisto/docs/web/

yarn
yarn install
yarn build
yarn serve-prod:docker

# or

npm install
npm run build
npm run serve-prod:docker