Skip to content
Merged

Docs #11

Show file tree
Hide file tree
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
Binary file added docs/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/community-logos/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions docs/community-logos/slack.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/community-logos/stackoverflow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/community-logos/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Contributing

* Star the project on [GitHub](https://github.com/dragosv/testcontainers-zig) and help spread the word :)
* Join our [Slack Workspace](https://slack.testcontainers.org/)
* Post an issue if you find any bugs
* Contribute improvements or fixes using a Pull Request. If you're going to contribute, thank you! Please just be sure to:
* Discuss with the authors on an issue ticket prior to doing anything big.
* Follow the style, naming, and structure conventions of the rest of the project.
* Make commits atomic and easy to merge.
* Verify all tests are passing with `zig build test --summary all` (requires Docker running for integration tests).
* Let `zig fmt` handle formatting.
69 changes: 69 additions & 0 deletions docs/contributing_docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Contributing to Documentation

The Testcontainers for Zig documentation lives in the `docs/` directory of the repository.

## Structure

```
docs/
├── index.md # Landing page
├── contributing.md # Contributing guide
├── contributing_docs.md # This file
├── quickstart/
│ └── index.md # Getting started guide
├── features/
│ ├── creating_container.md # ContainerRequest API
│ ├── creating_image.md # Image pulling and management
│ ├── networking.md # Ports and networks
│ ├── configuration.md # Docker host and configuration
│ ├── garbage_collector.md # Container cleanup patterns
│ ├── best_practices.md # Recommendations
│ ├── connection_strings.md # Connection string reference
│ ├── low_level_api.md # DockerClient access
│ └── wait/
│ └── introduction.md # Wait strategies
├── modules/
│ ├── index.md # Module overview
│ ├── postgres.md # PostgreSQL module
│ ├── mysql.md # MySQL module
│ ├── redis.md # Redis module
│ └── mongodb.md # MongoDB module
├── system_requirements/
│ ├── index.md # Zig, Docker, and OS requirements
│ └── ci/
│ ├── github_actions.md # GitHub Actions setup
│ ├── gitlab_ci.md # GitLab CI/CD setup
│ └── dind_patterns.md # Docker-in-Docker patterns
├── examples/
│ └── index.md # Usage examples
└── test_frameworks/
└── zig_test.md # Zig test integration patterns
```

## Guidelines

- Use Zig code examples — not Swift, Go, Java, or other languages.
- All code examples must use the actual testcontainers-zig API (`ContainerRequest` structs, `DockerProvider`, etc.).
- Ensure examples are consistent with the actual API in `src/`.
- Use fenced code blocks with the `zig` language identifier.
- Follow the [testcontainers-go documentation](https://golang.testcontainers.org/) style:
- Each page should follow: Introduction → Usage example → Reference tables → Examples.
- Module pages use: Introduction → Adding dependency → Usage example → Module Reference → Examples.
- Use tables for API reference (parameters, methods, options).
- Use admonitions (`!!! tip`, `!!! warning`, `!!! note`) for callouts.

## Adding a new page

1. Create the Markdown file in the appropriate directory.
2. Follow the structure of existing pages in the same section.
3. Cross-link to related pages where appropriate.
4. Verify all code samples are consistent with the current API.

## Adding a new module page

When a new container module is added to `src/modules/`, create a corresponding documentation page in `docs/modules/`:

1. Copy the structure from an existing module page (e.g., `postgres.md`).
2. Fill in: Introduction, Adding the dependency, Usage example, Module Reference (Options table, Container Methods table, Wait Strategy), and Examples.
3. Add the module to the table in `docs/modules/index.md`.
4. Cross-link from `docs/features/connection_strings.md` if it provides a connection string method.
128 changes: 128 additions & 0 deletions docs/css/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
h1, h2, h3, h4, h5, h6 {
font-family: 'Rubik', sans-serif;
}

[data-md-color-scheme="testcontainers"] {
--md-primary-fg-color: #00bac2;
--md-accent-fg-color: #361E5B;
--md-typeset-a-color: #0C94AA;
--md-primary-fg-color--dark: #291A3F;
--md-default-fg-color--lightest: #F2F4FE;
--md-footer-fg-color: #361E5B;
--md-footer-fg-color--light: #746C8F;
--md-footer-fg-color--lighter: #C3BEDE;
--md-footer-bg-color: #F7F9FD;
--md-footer-bg-color--dark: #F7F9FD;
}

.card-grid {
display: grid;
gap: 10px;
}

.tc-version {
font-size: 1.1em;
text-align: center;
margin: 0;
}

@media (min-width: 680px) {
.card-grid {
grid-template-columns: repeat(3, 1fr);
}
}

body .card-grid-item {
display: flex;
align-items: center;
gap: 20px;
border: 1px solid #C3BEDE;
border-radius: 6px;
padding: 16px;
font-weight: 600;
color: #9991B5;
background: #F2F4FE;
}

body .card-grid-item:hover,
body .card-grid-item:focus {
color: #9991B5;
}

.card-grid-item[href] {
color: var(--md-primary-fg-color--dark);
background: transparent;
}

.card-grid-item[href]:hover,
.card-grid-item[href]:focus {
background: #F2F4FE;
color: var(--md-primary-fg-color--dark);
}

.community-callout-wrapper {
padding: 30px 10px 0 10px;
}

.community-callout {
color: #F2F4FE;
background: linear-gradient(10.88deg, rgba(102, 56, 242, 0.4) 9.56%, #6638F2 100%), #291A3F;
box-shadow: 0px 20px 45px rgba(#9991B5, 0.75);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue (bug_risk): The rgba(#9991B5, 0.75) value is invalid CSS and will be ignored by browsers.

rgba() requires numeric RGB values, not a hex literal, so this declaration is invalid and the box-shadow will be ignored. To keep #9991B5 at 75% opacity, use rgba(153, 145, 181, 0.75) or #9991B5BF instead.

border-radius: 10px;
padding: 20px;
}

.community-callout h2 {
font-size: 1.15em;
margin: 0 0 20px 0;
color: #F2F4FE;
text-align: center;
}

.community-callout ul {
list-style: none;
padding: 0;
display: flex;
justify-content: space-between;
gap: 10px;
margin-top: 20px;
margin-bottom: 0;
}

.community-callout a {
transition: opacity 0.2s ease;
}

.community-callout a:hover {
opacity: 0.5;
}

.community-callout a img {
height: 1.75em;
width: auto;
aspect-ratio: 1;
}

@media (min-width: 1220px) {
.community-callout-wrapper {
padding: 40px 0 0;
}

.community-callout h2 {
font-size: 1.25em;
}

.community-callout a img {
height: 2em;
}
}

@media (min-width: 1600px) {
.community-callout h2 {
font-size: 1.15em;
}

.community-callout a img {
height: 1.75em;
}
}
Loading
Loading