diff --git a/.gitlab/ci/doc.gitlab-ci.yml b/.gitlab/ci/doc.gitlab-ci.yml index 7227b8acb..c2ad255ba 100644 --- a/.gitlab/ci/doc.gitlab-ci.yml +++ b/.gitlab/ci/doc.gitlab-ci.yml @@ -14,7 +14,7 @@ generate-helpers-doc: - cd doc - python generate_helper_doc.py - hub clone https://$GITHUB_TOKEN:x-oauth-basic@github.com/YunoHost/doc.git doc_repo - - cp helpers.html doc_repo/packaging_apps_helpers.md + - cp helpers.md doc_repo/pages/02.contribute/04.packaging_apps/11.helpers/packaging_apps_helpers.md - cd doc_repo # replace ${CI_COMMIT_REF_NAME} with ${CI_COMMIT_TAG} ? - hub checkout -b "${CI_COMMIT_REF_NAME}" diff --git a/doc/generate_helper_doc.py b/doc/generate_helper_doc.py index 1d3a95e39..f2d5bf444 100644 --- a/doc/generate_helper_doc.py +++ b/doc/generate_helper_doc.py @@ -39,7 +39,7 @@ def render(helpers): def shell_to_html(shell): return conv.convert(shell, False) - template = open("helper_doc_template.html", "r").read() + template = open("helper_doc_template.md", "r").read() t = Template(template) t.globals["now"] = datetime.datetime.utcnow result = t.render( @@ -48,7 +48,7 @@ def render(helpers): convert=shell_to_html, shell_css=shell_css, ) - open("helpers.html", "w").write(result) + open("helpers.md", "w").write(result) ############################################################################## diff --git a/doc/helper_doc_template.html b/doc/helper_doc_template.html deleted file mode 100644 index 60bfe0ecd..000000000 --- a/doc/helper_doc_template.html +++ /dev/null @@ -1,112 +0,0 @@ - - -
Doc auto-generated by this script on {{data.date}} (Yunohost version {{data.version}})
- -{% for category, helpers in data.helpers %} - -
- {% if not '\n' in h.usage %}
- Usage: {{ h.usage }}
- {% else %}
- Usage: {{ h.usage }}
- {% endif %}
-
- Arguments: -
{{ infos[0] }}
: {{ infos[1] }}{{ infos[0] }}
, {{ infos[1] }}
: {{ infos[2] }}- Returns: {{ h.ret }} -
- {% endif %} - {% if "example" in h.keys() %} -
- Example: {{ h.example }}
-
- Examples:
{{ example }}
- {% else %}
- {{ example.strip("# ") }}
- {% endif %}
- - Details: -
- {{ h.details.replace('\n', '') }} -
- - {% endif %} - - -