Skip to content

Commit d391f3a

Browse files
committed
Create readthedocs documentation
1 parent 5d53d3d commit d391f3a

29 files changed

+1148
-19
lines changed

.readthedocs.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/.readthedocs.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
version: 2
5+
6+
build:
7+
os: ubuntu-24.04
8+
tools:
9+
python: "3.13"
10+
jobs:
11+
pre_install:
12+
- pip install mkdocs-material
13+
14+
mkdocs:
15+
configuration: docs/mkdocs.yml
16+
17+
python:
18+
install:
19+
- requirements: docs/requirements.txt

docs/assets/css/theme.css

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
body {
2+
cursor: default;
3+
}
4+
5+
h1 {
6+
margin-bottom: 0.5em !important;
7+
color: #4051B5 !important;
8+
font-weight: 500 !important;
9+
}
10+
11+
h2 {
12+
margin-top: 0.5em !important;
13+
margin-bottom: 0.5em !important;
14+
color: #4051B5 !important;
15+
font-size: 1.3em;
16+
}
17+
18+
div.md-main__inner {
19+
margin-top: 0;
20+
}
21+
22+
:root {
23+
--md-typeset-a-color: #30a2a9;
24+
}
25+
26+
.icon-green {
27+
color: #069006;
28+
}
29+
30+
.md-typeset .admonition > .admonition-title {
31+
display: flex;
32+
justify-content: space-between;
33+
align-items: center;
34+
}
35+
36+
.tryit-link {
37+
margin-left: auto;
38+
}
39+
40+
li.md-nav__item--active > label.md-nav__link > span.md-ellipsis,
41+
li.md-nav__item--active > label.md-nav__link > span.md-nav__icon
42+
{
43+
color: var(--md-typeset-a-color);
44+
}

docs/assets/images/demo.gif

62 KB
Loading
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
document.addEventListener("DOMContentLoaded", function(event) {
2+
document.querySelector(".md-search__input").addEventListener("focus", (e) => {
3+
const event = new CustomEvent("readthedocs-search-show");
4+
document.dispatchEvent(event);
5+
});
6+
});

docs/assets/js/try-it.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
document.addEventListener("DOMContentLoaded", () => {
2+
document.querySelectorAll(".admonition .admonition-title").forEach(title => {
3+
if (title.textContent.trim() === "Try it!") {
4+
const link = document.createElement("a");
5+
link.href = "/en/latest/examples/execute-example";
6+
link.className = "tryit-link";
7+
link.textContent = "How to execute examples";
8+
title.appendChild(link);
9+
}
10+
});
11+
});

docs/contributing/tips-for-devs.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
hide:
3+
- toc
4+
---
5+
6+
# Work on the code
7+
8+
You can clone the project:
9+
```bash
10+
git clone git@github.com:steevanb/php-parallel-processes.git
11+
```
12+
13+
Then, when you to execute your local code, you need to add a volume on `/composer/vendor/steevanb/php-parallel-processes`:
14+
```bash hl_lines="6"
15+
docker \
16+
run \
17+
--rm \
18+
-it \
19+
-v "$(pwd)":/app \
20+
-v "$(pwd)":/composer/vendor/steevanb/php-parallel-processes \
21+
steevanb/php-parallel-processes:{{ package_version }}-alpine \
22+
php /app/parallel-processes.php
23+
```
24+
25+
# Work on the documentation
26+
27+
We use [readthedocs](https://about.readthedocs.com/),
28+
[mkdocs](https://docs.readthedocs.com/platform/stable/intro/mkdocs.html)
29+
and [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference).
30+
31+
Documentation is written in Markdown in [docs/](https://github.com/steevanb/php-parallel-processes/tree/readthedocs/docs).
32+
33+
See [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference/code-blocks/) for Markdown syntaxes and examples.

docs/examples/execute-example.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
hide:
3+
- toc
4+
---
5+
6+
# How to execute an example
7+
8+
You need to download the latest version of [parallel-processes-example.sh](https://raw.githubusercontent.com/steevanb/php-parallel-processes/refs/heads/master/examples/parallel-processes-example.sh).
9+
10+
`parallel-processes-example.sh` has one mandatory argument: the path to the example, after `example/` directory:
11+
```bash
12+
parallel-processes-example.sh path/to/example.php
13+
```
14+
15+
# Available examples
16+
17+
All examples are in [examples/](https://github.com/steevanb/php-parallel-processes/tree/master/examples).
18+
19+
# Configure an example
20+
21+
Some of them can be configured with env vars.
22+
23+
All configuration are prefixed by `PP_`.
24+
25+
```bash hl_lines="1"
26+
PP_CANCELED_AS_ERROR=true \
27+
parallel-processes-example.sh usage/process-configuration/canceled-as-error.php
28+
```

docs/getting-started/license.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
hide:
3+
- toc
4+
---
5+
6+
# License
7+
8+
`parallel-processes` is licensed under the [Apache 2.0 License](https://github.com/steevanb/php-parallel-processes/blob/master/LICENSE).
9+
10+
The Apache 2.0 license allows you to freely use, modify, and distribute software, including for commercial purposes,
11+
as long as you keep the copyright and license notices and indicate any changes made.

docs/index.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
hide:
3+
- toc
4+
---
5+
6+
# Presentation
7+
8+
`parallel-processes` is an open-source PHP library for running multiple processes in parallel.
9+
10+
![Parallel Processes demo](assets/images/demo.gif)
11+
12+
# Key features
13+
14+
<div class="grid cards" markdown>
15+
16+
- :material-docker:{ .lg .middle } __Install it or use Docker images__
17+
18+
---
19+
20+
Install it as a Composer dependency or use the provided Docker images to avoid a local installation.
21+
22+
[:octicons-arrow-right-24: Installation](installation/composer-dependency.md)
23+
24+
- :material-file-tree:{ .lg .middle } __Process start rules__
25+
26+
---
27+
28+
Configure when a process should start: immediately, after another process, during bootstrap, or during teardown.
29+
30+
[:octicons-arrow-right-24: Bootstrap or tear down](usage/bootstrap-tear-down.md)
31+
32+
- :material-cog-outline:{ .lg .middle } __Process configuration__
33+
34+
---
35+
36+
Configure each process: name, command, maximum execution time, output verbosity, etc.
37+
38+
[:octicons-arrow-right-24: Configure process](usage/process-configuration/miscellaneous.md)
39+
40+
- :material-cog-outline:{ .lg .middle } __Execution configuration__
41+
42+
---
43+
44+
Configure execution settings for your processes using PHP: process order, refresh interval, timeout, etc.
45+
46+
[:octicons-arrow-right-24: Minimal configuration](usage/minimal-configuration.md)
47+
48+
- :material-message-bulleted:{ .lg .middle } __Verbosity__
49+
50+
---
51+
52+
Control output verbosity: show process output, execution time, only errors, or all outputs.
53+
54+
[:octicons-arrow-right-24: Output verbosity](usage/output-verbosity.md)
55+
56+
- :material-compare:{ .lg .middle } __Theme__
57+
58+
---
59+
60+
Choose between the Default and Summary themes, or create a custom theme.
61+
62+
[:octicons-arrow-right-24: Theme configuration](theme/configuration.md)
63+
64+
</div>
65+
66+
# License
67+
68+
`parallel-processes` is licensed under the [Apache 2.0 License](getting-started/license.md).
69+
70+
# Links
71+
72+
GitHub: [steevanb/php-parallel-processes](https://github.com/steevanb/php-parallel-processes)
73+
74+
Docker Hub: [steevanb/php-parallel-processes](https://hub.docker.com/r/steevanb/php-parallel-processes)
75+
76+
Creator: [Steevan BARBOYON](http://prestation.info-droid.fr/)

0 commit comments

Comments
 (0)