| 1 |
Shellbox support for SyntaxHighlight |
| 2 |
==================================== |
| 3 |
|
| 4 |
[SyntaxHighlight][] shells out to the `pygmentize` script from |
| 5 |
[Pygments][]. The files in this directory are used in building a container |
| 6 |
image containing a specific version of Pygments that is suitable for use as |
| 7 |
a [Shellbox][] server for Extension:SyntaxHighlight. |
| 8 |
|
| 9 |
Files |
| 10 |
----- |
| 11 |
### pygmentize |
| 12 |
|
| 13 |
The `pygmentize` script is installed as `/srv/app/pygmentize` inside the |
| 14 |
container image. Calling MediaWiki servers should be configured with: |
| 15 |
```php |
| 16 |
$wgPygmentizePath = '/srv/app/pygmentize'; |
| 17 |
``` |
| 18 |
|
| 19 |
### requirements.txt |
| 20 |
|
| 21 |
The `requirements.txt` file is used to specify which version of Pygments to |
| 22 |
install inside of the container image. To help ensure the integrity of the |
| 23 |
installed package, pinning to a specific version and adding a hash to verify |
| 24 |
the downloaded wheel is recommended. See [pip's documentation on secure |
| 25 |
installs][pip-secure] for more information on hash-checking. |
| 26 |
|
| 27 |
|
| 28 |
[SyntaxHighlight]: https://www.mediawiki.org/wiki/Extension:SyntaxHighlight |
| 29 |
[Pygments]: https://pygments.org/ |
| 30 |
[Shellbox]: https://www.mediawiki.org/wiki/Shellbox |
| 31 |
[pip-secure]: https://pip.pypa.io/en/stable/topics/secure-installs/ |