Added sources

This commit is contained in:
Alexey Berezhok
2024-10-13 21:30:17 +03:00
commit 245878ec81
12 changed files with 1112 additions and 0 deletions

27
lib/templates/doc-all.md Normal file
View File

@@ -0,0 +1,27 @@
# CLI Reference
{% for cmdName, cmd in cmds %}
## {{ cmdName }}
[Source](https://github.com/hestiacp/hestiacp/blob/release/bin/{{cmdName}})
{% if cmd.info %}
{{ cmd.info }}
{% endif %}
**Options**: {% for option in cmd.options %}{{ '' if (option === 'NONE') else ('`' + (option | mdCode) + '`') }} {% endfor %}
{% if cmd.examples.length %}
**Examples**:
```{{ 'php' if cmd.php else 'bash' }}
{% for example in cmd.examples %}
{{ example }}
{% endfor %}
```
{% endif %}
{{ cmd.desc }}
{% endfor %}

25
lib/templates/doc-all.rst Normal file
View File

@@ -0,0 +1,25 @@
{% for cmdName, cmd in cmds %}
*******************************************************************
{{ cmdName }}
*******************************************************************
{% if cmd.info %}
**{{ cmd.info }}**
{% endif %}
**Options**: {% for option in cmd.options %}{{ '' if (option === 'NONE') else ('`' + (option | mdCode) + '`') }} {% endfor %}
{% if cmd.examples.length %}
**Examples**:
{% for example in cmd.examples %}
{{ 'php' if cmd.php else 'bash' }}
{{ example }}
{% endfor %}
{% endif %}
{{ cmd.desc }}
{% endfor %}

45
lib/templates/original.md Normal file
View File

@@ -0,0 +1,45 @@
# Hestia CLI Documentation
## Labels
Hint: use Ctrl+F to find them on page
- `{hestia}`: commands that are unique to Hestia and not inherited from Vesta
- `{panel}`: panel-specific commands
- `{dns}`: DNS-specific commands
- `{mail}`: mail-specific commands
## Contents
Hint: command short descriptions are displayed on hover
{% for cmdName, cmd in cmds %}
- [{{ cmdName }}](#{{ cmdName }} "{{ cmd.info | mdLinkTitle }}") {% for label in cmd.labels %}`{{ '{' + (label | mdCode) + '}' }}` {% endfor %}
{% endfor %}
## Commands
{% for cmdName, cmd in cmds %}
### {{ cmdName }} {% for label in cmd.labels %}`{{ '{' + (label | mdCode) + '}' }}` {% endfor %}
{% if cmd.info %}
*{{ cmd.info | md }}*
{% endif %}
**Options**: {% for option in cmd.options %}{{ '' if (option === 'NONE') else ('`' + (option | mdCode) + '`') }} {% endfor %}
{% if cmd.examples.length %}
**Examples**:
{% for example in cmd.examples %}
```{{ 'php' if cmd.php else 'bash' }}
{{ example | mdCode }}
```
{% endfor %}
{% endif %}
{{ cmd.desc | md }}
{% endfor %}