Skip to content

Commit 95acd4f

Browse files
committed
Create readthedocs documentation
1 parent 5d53d3d commit 95acd4f

30 files changed

+1095
-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: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
hide:
3+
- toc
4+
---
5+
6+
# Work on the code
7+
8+
You can add a volume from your project in `/composer/vendor/steevanb/php-parallel-processes` to work on the code:
9+
10+
```bash hl_lines="6"
11+
docker \
12+
run \
13+
--rm \
14+
-it \
15+
-v "$(pwd)":/app \
16+
-v "$(pwd)":/composer/vendor/steevanb/php-parallel-processes \
17+
steevanb/php-parallel-processes:1.1.0-alpine \
18+
php /app/parallel-processes.php
19+
```
20+
21+
# Work on the documentation
22+
23+
We use [readthedocs](https://about.readthedocs.com/),
24+
[mkdocs](https://docs.readthedocs.com/platform/stable/intro/mkdocs.html)
25+
and [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference).
26+
27+
Documentation is written in Markdown in [docs/](https://github.com/steevanb/php-parallel-processes/tree/readthedocs/docs).
28+
29+
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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
hide:
3+
- toc
4+
---
5+
6+
# How to execute an example
7+
8+
You need to download the latest version of [parallel-process-example.sh](https://raw.githubusercontent.com/steevanb/php-parallel-processes/refs/heads/master/examples/parallel-processes-example.sh).
9+
10+
Then you can execute it:
11+
```bash
12+
parallel-process-example.sh path/to/example.php
13+
```
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
hide:
3+
- toc
4+
---
5+
6+
# Compatibility
7+
8+
`parallel-processes` is compatible with most development and production environments.
9+
10+
# Installed as a Composer dependency
11+
12+
<div class="grid cards" markdown>
13+
14+
- :material-language-php: __PHP__: ^8.2
15+
- :material-penguin: __OS__: Linux and macOS
16+
- :material-symfony: __[symfony/console](https://symfony.com/doc/current/components/console.html)__: ^7.0
17+
- :material-symfony: __[symfony/process](https://symfony.com/doc/current/components/process.html)__: ^7.0
18+
19+
</div>
20+
21+
See [Installation with Composer](../installation/composer-dependency.md).
22+
23+
# Used with the Docker image
24+
25+
<div class="grid cards" markdown>
26+
27+
- :material-docker: __Docker__: a recent compatible Docker Engine must be installed
28+
- :material-penguin: __OS__: Linux, Windows and macOS
29+
30+
</div>
31+
32+
See [use it with Docker](../installation/docker-image.md).

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.

0 commit comments

Comments
 (0)