yarn && yarn startThen navigate to localhost:8000
The staging url is docs-stg.launchdarkly.com.
Staging is automatically refreshed on push to master. See Build & Deploy.
Github action automatically builds and deploys to staging on push to master.
If you want to manually deploy your own branch to staging, do this:
yarn deployThis will build gatsby and upload the artifacts to the staging s3 bucket.
All navigation data are stored in src/content/navigationData.json.
This is flattened at build time to autogenerate two files rootTopics.json and secondLevelTopics.json. The
flattened data are queryable via graphql and allows us to render the side nav more efficiently.
Please reach out to @scribblingfox if you need to login to the Algolia dashboard. She will be able to send you an invite.
To index mdx content and send to algolia, create a local .env.development file that contains the following:
GATSBY_ALGOLIA_APP_ID=insertValue
GATSBY_ALGOLIA_SEARCH_KEY=insertValue
ALGOLIA_ADMIN_KEY=insertValue
GATSBY_ALGOLIA_INDEX=insertValueGATSBY_ALGOLIA_INDEX is the index name that will be used to create the algolia index for your content.
For example, if you set GATSBY_ALGOLIA_INDEX=Pages and you run yarn build-dev, this will crawl
all mdx files under src/content/topics and create an algolia index called Pages_development.
The convention is {GATSBY_ALGOLIA_INDEX}_{ENVIRONMENT}. The environment variable can be set via
cli param GATSBY_ACTIVE_ENV. For example, for staging, you would run the following command:
"build-staging": "GATSBY_ACTIVE_ENV=staging gatsby build",This will create an algolia index called Pages_staging.
The src/content/topics folder contains all the docs markdown. If you would like to contribute to the
docs, this will be the place to start.
If you encounter what looks like a gatsby cache issue, you can clean the gatsby cache first:
yarn cleanIf you still encounter issues, perform a clean-all to delete all possible caches:
yarn clean-all