Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 40 additions & 6 deletions docs/creating-your-site.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
# Creating your site

After you've [installed] Material for MkDocs, you can bootstrap your project
documentation using the `mkdocs` executable. Go to the directory where you want
your project to be located and enter:
After you've [installed] Material for MkDocs, you can bootstrap your documentation project then preview your documentation and finaly build your site using the `mkdocs` executable.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain why this change is necessary? It doesn't have anything to do with what you described in your PR.


## Bootstrap your project

Go to the directory where you want your project to be located and enter:

```
mkdocs new .
```

Alternatively, if you're running Material for MkDocs from within Docker, use:

=== "Unix, Powershell"

=== "Unix"

```
docker run --rm \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please format this as:

docker run --rm \
  ... (two spaces) \
  .... (and so on)

--user $(id -u):$(id -g) \
--volume $(pwd):/docs \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove -it?

squidfunk/mkdocs-material \
new . # bootstrap project
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the comment, this is not necessary, as it's described in the paragraph above.

```

=== "Powershell"

```
docker run --rm -it -v ${PWD}:/docs squidfunk/mkdocs-material new .
Expand Down Expand Up @@ -210,7 +223,18 @@ mkdocs serve # (1)!

If you're running Material for MkDocs from within Docker, use:

=== "Unix, Powershell"
=== "Unix"

```
docker run --rm \
--user $(id -u):$(id -g) \
--volume $(pwd):/docs \
--publish 127.0.0.1:8000:8000 \
squidfunk/mkdocs-material
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

# serve by default (Ctrl + C to stop preview server)
```

=== "Powershell"

```
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material
Expand Down Expand Up @@ -241,7 +265,17 @@ mkdocs build

If you're running Material for MkDocs from within Docker, use:

=== "Unix, Powershell"
=== "Unix"

```
docker run --rm \
--user $(id -u):$(id -g) \
--volume $(pwd):/docs \
squidfunk/mkdocs-material \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

build # build static site in $(pwd)/site
```

=== "Powershell"

```
docker run --rm -it -v ${PWD}:/docs squidfunk/mkdocs-material build
Expand Down