This repo hosts all of the Android documentation for the Mapbox platform, including the Maps SDK, the Java SDK, the Navigation SDK, and Mapbox Plugins. Visit Mapbox Android Docs to view the live website.
To host this website locally, you'll need to have Node.js installed and setup via nvm.
This repository uses git submodules, so it needs to be cloned recursively to include:
examples/maps, sourced from
examples/navigation, sourced from
git clone --recursive firstname.lastname@example.org:mapbox/android-docs.git
Change your working directory to the cloned repository:
nvm to install and use the version of node specified in
nvm install nvm use
Upgrade your version of
npm install -g npm@6
To install site and build dependencies, run:
The Android documentation uses Batfish, a static-site generator powered by react and webpack. To get started contributing to the documentation and running the site locally you'll need to navigate to this projects folder and execute:
This will set up a server running at http://localhost:8080/android/. If you make changes to the source content, your browser should automatically refresh using livereload once you save the file.
Running tests locally
To run the tests locally, run:
- Run remark-linters that lint markdown files
- Run @mapbox/copyeditor to validate writing
- asserts the Mapbox documentation style guide
- checks spelling
- checks for plain language and suggests alternatives
If the tests return an error or warning, follow the guidance from the test to fix it.
Updating for SDK releases
To update the site for a Maps SDK or Navigation SDK release:
node scripts/update.js <product> <version>. Where :
<version>is the version number. It must follow the format
Xis an integer. Optional: append the version number with
Xis also an integer.
- Commit and push the commits that are created.
- Update the relevant variable in
- Add the new version number to the relevant data file (
- Rewrite the relevant HTML redirects in the
api/folder to point to the docs for the new version number.
Contributing new documentation
If you'd like to add to this repo's Android documentation, please read the contribution guide to learn how to get started.