Skip to content

Commit

Permalink
docs: add a contribution to the documentation guide
Browse files Browse the repository at this point in the history
Signed-off-by: Mahe Tardy <[email protected]>
  • Loading branch information
mtardy committed Jan 17, 2024
1 parent 0e715a4 commit c521733
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 43 deletions.
41 changes: 2 additions & 39 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,3 @@
# Tetragon documentation
# Documentation

## Preview locally

### Using Docker

Install Docker locally, and then use:

```shell
make
```

Note that you can use `make docs` from the main Makefile at the root folder
level.

To cleanup, you can remove the built image using:

```shell
make clean
```

### Local Hugo installation

The documentation is a [Hugo static website](https://github.com/gohugoio/hugo)
using the [Docsy theme](https://github.com/google/docsy).

Please refer to both dedicated guides on how to install Hugo+extended and how
to tweak Docsy but generally, to preview your work:
```shell
hugo server
```

## Content

Shortcut to the content:
[content/en/docs](https://github.com/cilium/tetragon/tree/main/docs/content/en/docs).

## Style

We generally follow the Kuberentes docs style guide: https://kubernetes.io/docs/contribute/style/style-guide/
See https://tetragon.io/docs/contribution-guide/documentation.
5 changes: 3 additions & 2 deletions docs/content/en/docs/contribution-guide/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ We're happy you're interested in contributing to the Tetragon project.
## All contributions are welcome

While this document focuses on the technical details of how to submit patches
to the Tetragon project, we want to value all kinds of contributions.
to the Tetragon project, we value all kinds of contributions.

For example, actions that can greatly improve Tetragon and contribute to its
success could be:
Expand Down Expand Up @@ -69,7 +69,8 @@ merged upstream.
7. Follow the steps in [making changes]({{< ref "/docs/contribution-guide/making-changes" >}})
to start contributing.
8. Learn how to [run the tests]({{< ref "/docs/contribution-guide/running-tests" >}}).
8. Learn how to [run the tests]({{< ref "/docs/contribution-guide/running-tests" >}})
or how to [preview and contribute to the docs]({{< ref "/docs/contribution-guide/documentation" >}}).
9. Learn how to [submit a pull request]({{< ref "/docs/contribution-guide/submitting-a-pull-request" >}})
to the project.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Developer's certificate of origin"
weight: 5
weight: 6
description: "Learn about the \"sign-off\" procedure"
---

Expand Down
65 changes: 65 additions & 0 deletions docs/content/en/docs/contribution-guide/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
title: "Documentation"
weight: 4
description: "Learn how to contribute to the documentation"
---

Thank you for taking the time to improve Tetragon's documentation.

## Find the content

All the Tetragon documentation content can be found under
[github.com/cilium/tetragon/docs/content/en/docs](https://github.com/cilium/tetragon/tree/main/docs/content/en/docs).

{{< note >}}
The main page served from a directory path is named `_index.md`. For example
[/docs/contribution-guide]({{< ref "/docs/contribution-guide" >}}) is available
under [/docs/content/en/docs/contribution-guide/\_index.md](https://github.com/cilium/tetragon/blob/main/docs/content/en/docs/contribution-guide/_index.md).
{{< /note >}}

## Style to follow

We generally follow the Kubernetes docs style guide
[k8s.io/docs/contribute/style/style-guide](https://kubernetes.io/docs/contribute/style/style-guide/).

## Preview locally

To preview the documentation locally, use one of the method below. Then browse
to [localhost:1313/docs](http://localhost:1313/docs), the default port used by Hugo to
listen.

{{< note >}}
When submitting a docs related pull request, a Netlify job will automatically
build a preview of your changes and post the link in a PR comment, it is often
a good idea to edit your initial PR message and link to the precise location
of your changes within the preview to help the reviewer's job.
{{< /note >}}

### Using Docker

With a Docker service available, from the root of the repository, use:

```shell
make docs
```

You can also use `make` from the Makefile at the `/docs` folder level.

To cleanup the container image built in the process, you can use:

```shell
make -C docs clean
```

### Local Hugo installation

The documentation is a [Hugo static website](https://github.com/gohugoio/hugo)
using the [Docsy theme](https://github.com/google/docsy).

Please refer to dedicated guides on how to install Hugo+extended and how to
tweak Docsy, but generally, to preview your work, from the `/docs` folder:
```shell
hugo server
```


Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Submitting a pull request"
weight: 4
weight: 5
description: "Learn how to submit a pull request to the project"
---

Expand Down

0 comments on commit c521733

Please sign in to comment.