npm install
npm dev
The dev command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
The documentation website is hosted by AWS Amplify. All changes merged to the main branch are automatically deployed to docs.epilot.io
When documenting your APIs, it's possible to perform changes and eval how they look within the docs portal while running locally.
For that, all you need to do is follow the instructions below:
DOCS_URL=http://localhost:3001/ npm run devto run the docs portal locallynpm run swagger-ui:watchto serve your api docs locally on your API project- Finally to bypass CORS you will want to get this Chrome extension
When you are done, just deploy your openapi.yml as you normally would. And don't forget to update your client sdk here.
The site search is a local plugin in src/plugins/search:
indexer.jsruns afternpm run buildand writesbuild/search-index.json. It indexes every section of the rendered docs and changelog pages, and every operation of the OpenAPI specs listed inredoc.config.js.engine.jsranks results in the browser (BM25F with field weights, stemming, prefix and typo matching, title and phrase boosts).theme/SearchBaris the search dialog (Ctrl/⌘ Kor/).
The dev server (npm start) has no index of its own: it serves the one from the last npm run build.
After changing the ranking, verify it against the built index:
npm run build
npm run test:search # relevance checks
npm run test:search -- "webhook signature" # print the results of a queryTo keep an element out of the index, add a data-search-ignore attribute to it.