mirror of https://github.com/knative/docs.git
Updates instructions on running mkdocs locally in docker (#4849)
* updates instructions on running mkdocs locally in docker Signed-off-by: Paul S. Schweigert <paulschw@us.ibm.com> * remove whitespace Signed-off-by: Paul S. Schweigert <paulschw@us.ibm.com> * style Signed-off-by: Paul S. Schweigert <paulschw@us.ibm.com>
This commit is contained in:
parent
c974492eab
commit
bee86d6299
|
@ -1,29 +1,3 @@
|
||||||
# Development notes for working with mkdocs
|
# Development notes for working with mkdocs
|
||||||
|
|
||||||
You can use a Docker container and run MkDocs from the container, so no local installation of mkdocs is required:
|
For details about how to use a container for local development, see [Use the Docker container](../../contribute-to-docs/getting-started/previewing-docs-locally.md#option-1-use-the-docker-container) on the Previewing Docs Locally page.
|
||||||
|
|
||||||
- You need to have [Docker](https://www.docker.com) installed and running on your system
|
|
||||||
- There are helper configurations installed if you have npm from [Node.JS](https://nodejs.org) installed.
|
|
||||||
- Build the development docker container image, this is only need it once if the dependencies have not changed.
|
|
||||||
```bash
|
|
||||||
npm run dev:build
|
|
||||||
```
|
|
||||||
- To start developing run the following command in the root directory of the git repo (where **package.json** and **mkdocs.yaml** are located)
|
|
||||||
```bash
|
|
||||||
npm run dev
|
|
||||||
```
|
|
||||||
- Open a browser to http://localhost:8000, where you will see the documentation site. This will live update as you save changes to the Markdown files in the `docs` directory.
|
|
||||||
- To stop developing run the following command in another terminal window, which will terminate the docker container
|
|
||||||
```bash
|
|
||||||
npm run dev:stop
|
|
||||||
```
|
|
||||||
- To build the static HTML files including both mkdocs and hugo run the following command.
|
|
||||||
```bash
|
|
||||||
npm test
|
|
||||||
```
|
|
||||||
- To view additional npm scripts run the following command
|
|
||||||
```bash
|
|
||||||
npm run
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue