Skip to content

Commit

Permalink
docs: improve contributing docs for code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed May 20, 2024
1 parent 35ff929 commit bf35ba7
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions docs/contributing_docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,25 @@
The _Testcontainers for Go_ documentation is a static site built with [MkDocs](https://www.mkdocs.org/).
We use the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) theme, which offers a number of useful extensions to MkDocs.

In addition we use a [custom plugin](https://github.com/rnorth/mkdocs-codeinclude-plugin) for inclusion of code snippets.

We publish our documentation using Netlify.

## Adding code snippets

To include code snippets in the documentation, we use the [codeinclude plugin](https://github.com/rnorth/mkdocs-codeinclude-plugin), which uses the following syntax:

&lt;!--codeinclude--&gt;<br/>
&#91;Human readable title for snippet&#93;(./relative_path_to_example_code.go) block:someString<br/>
&#91;Human readable title for snippet&#93;(./relative_path_to_example_code.go) inside_block:someString<br/>
&lt;!--/codeinclude--&gt;<br/>

Where each title snippet in the same `codeinclude` block would represent a new tab
in the snippet, and each `targeting_expression` would be:

- `block:someString` or
- `inside_block:someString`

Please refer to the [codeinclude plugin documentation](https://github.com/rnorth/mkdocs-codeinclude-plugin) for more information.

## Previewing rendered content

### Using Python locally
Expand Down

0 comments on commit bf35ba7

Please sign in to comment.