GithubHelp home page GithubHelp logo

launchdarkly-docs's Introduction

Gatsby

LaunchDarkly's Docs

๐Ÿšด Development

yarn && yarn start

Then navigate to localhost:8000

๐ŸŒ— Staging

The staging url is docs-stg.launchdarkly.com.

Staging is automatically refreshed on push to master. See Build & Deploy.

๐Ÿš€ 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 deploy

This will build gatsby and upload the artifacts to the staging s3 bucket.

๐Ÿ”จ Navigation data

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.

๐Ÿ” Algolia search

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=insertValue

GATSBY_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.

๐Ÿ‘ฅ Markdown content

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.

๐Ÿ”ฅ Issues

If you encounter what looks like a gatsby cache issue, you can clean the gatsby cache first:

yarn clean

If you still encounter issues, perform a clean-all to delete all possible caches:

yarn clean-all

launchdarkly-docs's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.