Skip to content

Commit

Permalink
chore: update contribution guidelines
Browse files Browse the repository at this point in the history
Moves most of the contribution guidelines to the well-known
CONTRIBUTING.md file

Signed-off-by: David Karlsson <[email protected]>
  • Loading branch information
dvdksn committed Dec 1, 2023
1 parent e75dfd5 commit 49f14f7
Show file tree
Hide file tree
Showing 7 changed files with 132 additions and 139 deletions.
113 changes: 110 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,113 @@
# Contributing to Docker Documentation

We deeply value documentation contributions from the Docker community. We'd like to make it as easy
as possible for you to work in this repository.
We value documentation contributions from the Docker community. We'd like to
make it as easy as possible for you to work in this repository.

We have created a ['Contribute' section](https://docs.docker.com/contribute/overview/) in our docs which guides you through the process of contributing to Docker documentation.
Our style guide and instructions on using our page templates and components is
available in the [contribution section](https://docs.docker.com/contribute/) on
the website.

The following guidelines describe the ways in which you can contribute to the
Docker documentation at <https://docs.docker.com/>, and how to get started.

## Reporting issues

If you encounter a problem with the content, or the site in general, feel free
to [submit an issue](https://github.com/docker/docs/issues/new/choose) in our
[GitHub issue tracker](https://github.com/docker/docs/issues). You can also use
the issue tracker to raise requests on improvements, or suggest new content
that you think is missing or that you would like to see.

## Editing content

The website is built using [Hugo](https://gohugo.io/). The content is primarily
Markdown files in the `/content` directory of this repository (with a few
exceptions, see [Content not edited here](#content-not-edited-here)).

The structure of the sidebar navigation on the site is defined in
[`/data/toc.yaml`](./data/toc.yaml). To rename or change the location of a page
in the left-hand navigation, edit the `toc.yaml` file.

You can edit the files directly on GitHub using the web editor, or
[locally](#local-setup), whichever way you prefer.

### General guidelines

Help make reviewing easier by following these guidelines:

- Try not to touch a large number of files in a single PR if possible.
- Don't change whitespace or line wrapping in parts of a file you aren't
editing for other reasons. Make sure your text editor isn't configured to
automatically reformat the whole file when saving.
- We use GitHub Actions for testing and creating preview deployments for each
pull request. The URL of the preview deployment is added as a comment on the
pull request. Check the staging site to verify how your changes look and fix
issues, if necessary.

### Local setup

You can use Docker (surprise) to build and serve the files locally. This
requires Docker Desktop version 4.24 or later, or Docker Engine with Docker
Compose version 2.22 or later.

1. Clone the repository:

```console
$ git clone [email protected]:docker/docs.git
$ cd docs
```

2. Check out a branch:

```console
$ git checkout -b <branch>
```

3. Start the local development server:

```console
$ docker compose watch
```

The site will be served for local preview at <http://localhost:1313>. The
development server watches for changes and automatically rebuilds your site.

To stop the development server:

1. In your terminal, press `<Ctrl+C>` to exit the file watch mode of Compose.
2. Stop the Compose service with the `docker compose down` command.

### Testing

Before you push your changes and open a pull request, we recommend that you
test your site locally first. Local tests check for broken links, incorrectly
formatted markup, and other things. To run the tests:

```console
$ docker build bake validate
```

If this command doesn't result in any errors, you're good to go!

## Content not edited here

CLI reference documentation is maintained in upstream repositories. It's
partially generated from code, and is only vendored here for publishing. To
update the CLI reference docs, refer to the corresponding repository:

- [docker/cli](https://github.com/docker/cli)
- [docker/buildx](https://github.com/docker/buildx)
- [docker/compose](https://github.com/docker/compose)

Feel free to raise an issue on this repository if you're not sure how to
proceed, and we'll help out.

Other content that appears on the site, but that's not edited here, includes:

- Dockerfile reference
- Docker Engine API reference
- Compose specification
- Buildx Bake reference

If you spot an issue in any of these pages, feel free to raise an issue here
and we'll make sure it gets fixed in the upstream source.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ We've made it easy for you to file new issues.
We value your contribution. We want to make it as easy as possible to submit
your contributions to the Docker docs repository. Changes to the docs are
handled through pull requests against the `main` branch. To learn how to
contribute, see our [Contribute section](https://docs.docker.com/contribute/overview/).
contribute, see [CONTRIBUTING.md](CONTRIBUTING.md).

## Copyright and license

Expand Down
8 changes: 5 additions & 3 deletions content/compose/file-watch.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,13 @@ This pattern can be followed for many languages and frameworks, such as Python w
2. Run `docker compose watch` to build and launch a Compose project and start the file watch mode.
3. Edit service source files using your preferred IDE or editor.

>**Looking for a sample project to test things out?**
> **Looking for a sample project to test things out?**
>
> Check out [`dockersamples/avatars`](https://github.com/dockersamples/avatars), or [build the docs site locally](../contribute/contribute-guide.md#build-and-preview-the-docs-locally) for a demonstration of Compose `watch`.
> Check out [`dockersamples/avatars`](https://github.com/dockersamples/avatars),
> or [local setup for Docker docs](https://github.com/docker/docs/blob/main/CONTRIBUTING.md)
> for a demonstration of Compose `watch`.
{ .tip }

## Feedback

We are actively looking for feedback on this feature. Give feedback or report any bugs you may find in the [Compose Specification repository](https://github.com/compose-spec/compose-spec/pull/253).
We are actively looking for feedback on this feature. Give feedback or report any bugs you may find in the [Compose Specification repository](https://github.com/compose-spec/compose-spec/pull/253).
23 changes: 14 additions & 9 deletions content/contribute/overview.md → content/contribute/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@
title: Contribute to Docker's docs
toc_max: 1
aliases:
- /CONTRIBUTING/
- /opensource/
- /contribute/overview/
- /contribute/contribute-guide/
grid:
- title: Contribution guidelines
description: Learn about the process of contributing to our docs.
icon: description
link: /contribute/contribute-guide
- title: Grammar and style
description: Explore Docker's grammar and style guide
icon: menu_book
Expand All @@ -29,18 +26,26 @@ grid:
description: Explore commonly used Docker terms.
icon: spellcheck
link: /contribute/style/terminology
- title: Voice and tone
description: Learn about how we use voice and tone in our writing.
icon: voice_selection
link: /contribute/style/voice-tone
---

We deeply value documentation contributions from the Docker community. We'd like to make it as easy
as possible for you to work in this repository. The following sections guide you through the process of contributing to Docker documentation.
We value documentation contributions from the Docker community. We'd like to
make it as easy as possible for you to contribute to the Docker documentation.

Find the contribution guidelines in
[CONTRIBUTING.md](https://github.com/docker/docs/blob/main/CONTRIBUTING.md) in
the `docker/docs` GitHub repository. Use the following links to review our
style guide and instructions on how to use our page templates and components.

{{< grid >}}

### Additional resources

We also provide:
See also:

- A section of useful components you can add to your documentation.
- Information on Docker's [tone and voice](style/voice-tone.md).
- A [writing checklist](checklist.md) to help you when you're contributing to Docker's documentation.
- A command-line tool called vale to check the style and [help you find errors in your writing](contribute-guide.md#test-the-docs-locally).
2 changes: 1 addition & 1 deletion content/contribute/components/badges.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ toc_max: 3

You can also make a badge a link.

[{{< badge color="blue" text="badge with a link" >}}](../overview.md)
[{{< badge color="blue" text="badge with a link" >}}](../_index.md)

### Markup

Expand Down
119 changes: 0 additions & 119 deletions content/contribute/contribute-guide.md

This file was deleted.

4 changes: 1 addition & 3 deletions data/toc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,8 @@ Guides:

- sectiontitle: Contribute
section:
- path: /contribute/overview/
- path: /contribute/
title: Contribute to Docker's docs
- path: /contribute/contribute-guide/
title: Contribution guidelines
- sectiontitle: Style guide
section:
- path: /contribute/style/grammar/
Expand Down

0 comments on commit 49f14f7

Please sign in to comment.