|
4 | 4 |
|
5 | 5 | You can make a limited range of edits from the Github site, but this system works best if you clone it locally so you can run test builds.
|
6 | 6 |
|
7 |
| -# Local development with ruby, without platform-api |
8 |
| - |
9 |
| -* If using OSX, install command line tools, `xcode-select --install` |
10 |
| -* If using Linux, install Ruby https://www.ruby-lang.org/en/documentation/installation/ |
11 |
| -* Setup local ruby env, `make env` |
12 |
| -* Install project deps, `make deps` |
13 |
| -* Run server, `make dev` |
| 7 | +# Quickstart (local development with docker) |
| 8 | +You will need to have Docker installed https://docs.docker.com/install/ |
| 9 | +* If using Linux, run `make docker-dev` |
14 | 10 | * Visit http://localhost:4000/docsv2/
|
15 | 11 |
|
16 |
| -# Local development with docker, without platform-api |
| 12 | +# Local development with `ruby` and `node`, without platform-api |
17 | 13 |
|
18 | 14 | * If using OSX, install command line tools, `xcode-select --install`
|
19 |
| -* Install docker. For OSX: https://docs.docker.com/docker-for-mac/install/ |
20 |
| -* Run `make docker-serve` |
| 15 | +* Install `Ruby` https://www.ruby-lang.org/en/documentation/installation/ |
| 16 | +* Install `Node` https://nodejs.org/en/download/ |
| 17 | +* Install `Yarn` https://yarnpkg.com/en/docs/install |
| 18 | +* Install `Bundler` `gem install bundler` |
| 19 | +* Run server, `make dev` |
21 | 20 | * Visit http://localhost:4000/docsv2/
|
22 | 21 |
|
23 |
| -Use the local build process to preview local changes. If you're doing a release, you can use the `make docs` to see how this would work in the docker container environment that's more like production. |
24 |
| - |
25 | 22 | ## Makefile commands
|
26 | 23 |
|
27 |
| -- `docs`: locally builds the docs and serves the static content via a Docker container running nginx |
28 | 24 | - `build`: Builds the site docs. Used by CI to publish the docs to staging and production
|
29 |
| -- `docker-serve`: Uses docker to build the docs locally, without needing to refresh the catalog from the platform-api |
30 | 25 | - `nav`: Rebuilds the entire nav datafile based on the current doc structure. This is destructive and should not be used unless absolutely necessary.
|
31 | 26 | - `catalog`: Pulls in the latest catalog data from the Platform API and saves it in the respective data files. Requires an API key to be passed in env via PLATFORM_API_TOKEN
|
32 |
| -- `env`: for when you're first getting set up: installs bundler, and installs the deps for the repo. |
33 | 27 | - `seed`: copies all example data files out of the `_templates` directory and puts them in the `_data` directory. Useful if you don't have a way to setup an API key.
|
34 |
| -- `clean`: runs `jekyll clean` locally |
35 |
| -- `deps`: re-runs `bundle install` locally. |
| 28 | +- `clean`: removes all build artifacts |
| 29 | +- `clean-deps`: removes all doownloaded `gems` and `node_modules` |
| 30 | +- `deps`: installs the required `gems` and `node_modules` |
36 | 31 | - `dev`: runs `jekyll serve` locally with incremental builds. Useful when updating CSS, JS, or content and you don't want to rebuild everytime.
|
37 | 32 |
|
38 |
| -- docker-clean: runs a `jekyll clean` on a docker host. |
39 |
| -- docker-deps: runs `bundle install` on a docker host. |
| 33 | +- docker-build: runs `make build` on a docker host. |
40 | 34 | - docker-dev: runs `make dev` on a docker host.
|
41 |
| -- docker-nav: runs `make nav` on a docker host. |
42 |
| -- docker-catalog: runs `make catalog` on a docker host. |
43 | 35 |
|
44 | 36 | # Layouts
|
45 | 37 | `default.html` is the container through which all the individual other layouts (currently one, `page.html`) are built to have the right title, seo, etc.
|
|
0 commit comments