This repository is the source for content published to https://ably.com/docs.
The source content is written in Textile and the site is generated by Gatsby.
To run the docs site locally, run bin/dev from the root directory. Alternatively, follow these steps:
-
Install Node 20 and Yarn 1.22
-
Clone this repository and make it your working directory.
-
Run
yarn installto install all dependencies. -
If this is the first time running the site, run
yarn run develop:env-setupto setup your environment variables. Visitlocalhost:8000to view the site. -
Run
yarn run developand visitlocalhost:8000to view the site.
View the contribution guide for information on how to write content and contribute to Ably docs.
If you have any questions or suggestions, please raise an issue.
The Website app forwards requests to /docs to the docs.ably.com site.
Asset prefixing is applied only during the app build process and is not available in the dev version.
To ensure proper setup in your local:
- Set the
ASSET_PREFIX=http://localhost:9000variable in your environment. - Add
DOCS_BASE_URL=http://localhost:9000to your.envfile in the root of the Website app. - Ensure that
.env.productionexists in the app root for the Yarn build to function correctly. - You should be able to view the content and toggle between signed in and signed-out states.
Create a review app by adding the review-app label to your PR.
Review apps can only be generated by members of the Ably GitHub organisation and are protected by basic authentication.
Review apps are automatically cleaned up when:
- A PR is closed, or;
- The
review-applabel is removed.