diff --git a/metadata.yaml b/metadata.yaml index 4aa8a0af..ce0badb4 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -202,9 +202,9 @@ categories: pdf_name: bms-dev-guide hc_location: devg/bms - html_location: docs/bms/image-creation-guide - rst_location: doc/image-creation-guide + rst_location: doc/image-creation-guide/source title: Private Image Creation Guide - type: dummy + type: image-creation-guide pdf_name: bms-image-creation-guide hc_location: bpicg/bms - html_location: docs/bms/umn @@ -277,9 +277,9 @@ categories: pdf_name: ims-dev-guide hc_location: devg/ims - html_location: docs/ims/public-images - rst_location: docs/ims/public-images + rst_location: doc/public-images/source title: Public Image Introduction - type: dummy + type: public-images pdf_name: ims-public-images - html_location: docs/ims/umn rst_location: umn/source @@ -373,15 +373,9 @@ categories: - html_location: docs/obs/s3api rst_location: doc/s3api/source title: S3 API Reference - type: dummy + type: s3api pdf_name: obs-s3api hc_location: api_obs/obs - - html_location: docs/obs/s3cmd - rst_location: doc/s3cmd/source - title: Third-Party Client (s3cmd) - type: dummy - pdf_name: obs-s3cmd - hc_location: ugs3cmd/obs - html_location: docs/obs/umn rst_location: umn/source title: User Guide @@ -420,12 +414,6 @@ categories: type: api-ref pdf_name: sfs-api-ref hc_location: api/sfs - - html_location: docs/sfs/cli - rst_location: doc/cli/source - title: Manila Client Reference - type: dummy - pdf_name: sfs-cli - hc_location: api_cli/sfs - html_location: docs/sfs/umn rst_location: umn/source title: User Guide @@ -469,7 +457,6 @@ categories: rst_location: umn/source title: User Guide type: umn - pdf_name: cce-umn hc_location: usermanual2/cce teams: - name: docs-container-rw @@ -851,7 +838,7 @@ categories: - html_location: docs/dws/tool rst_location: doc/tool/source title: Tool Guide - type: dummy + type: tool-guide pdf_name: dws-tool-guide hc_location: tg/dws - html_location: docs/dws/umn @@ -893,9 +880,9 @@ categories: pdf_name: mrs-api-ref hc_location: api/mrs - html_location: docs/mrs/component-operation-guide - rst_location: docs/mrs/component-operation-guide + rst_location: doc/component-operation-guide/source title: Component Operation Guide - type: dummy + type: operation-guide pdf_name: mrs-component-operation-guide hc_location: cmpntguide/mrs - html_location: docs/mrs/umn diff --git a/playbooks/run.yaml b/playbooks/run.yaml index e03586ef..1b8e39e1 100644 --- a/playbooks/run.yaml +++ b/playbooks/run.yaml @@ -25,9 +25,9 @@ dest: "{{ ansible_user_dir }}/{{ doc.0.repository }}/{{ doc.1.rst_location }}" source: "{{ zuul.project.src_dir }}/{{ doc.1.html_location }}" doc_title: "{{ [ doc.0.service_title, doc.1.title ] | join(' - ') }}" - doc_service: "{{ doc.0.service_title | default(omit) }}" - doc_repo_name: "{{ doc.0.repository | default(omit) }}" - doc_pdf_name: "{{ [ doc.1.pdf_name ] | join('-') }}" + doc_service: "{{ doc.0.service_title | default(None) }}" + doc_repo_name: "{{ doc.0.repository | default(None) }}" + doc_pdf_name: "{{ doc.1.pdf_name | default(None) }}" loop: "{{ doc_exports_var | subelements('docs') }}" loop_control: loop_var: "doc" diff --git a/roles/convert_doc/tasks/main.yaml b/roles/convert_doc/tasks/main.yaml index 12feae52..ecebb39d 100644 --- a/roles/convert_doc/tasks/main.yaml +++ b/roles/convert_doc/tasks/main.yaml @@ -1,30 +1,45 @@ - name: Emit pandoc version command: "pandoc --version" +# Since role is applied in the loop it is necessary to unset host facts +- name: Reset convert_params + ansible.builtin.set_fact: + convert_params: "" + - name: Add destination to parameters ansible.builtin.set_fact: convert_params: "{{ convert_params }} --dest {{ dest }}" - when: "dest is defined" + when: + - "dest is defined" + - "dest | length > 0" - name: Add title to parameters ansible.builtin.set_fact: convert_params: "{{ convert_params }} --title '{{ doc_title }}'" - when: "doc_title is defined" + when: + - "doc_title is defined" + - "doc_title | length > 0" - name: Add service to parameters ansible.builtin.set_fact: convert_params: "{{ convert_params }} --service '{{ doc_service }}'" - when: "doc_service is defined" + when: + - "doc_service is defined" + - "doc_service | length > 0" - name: Add repo_name to parameters ansible.builtin.set_fact: convert_params: "{{ convert_params }} --repo-name '{{ doc_repo_name }}'" - when: "doc_repo_name is defined" + when: + - "doc_repo_name is defined" + - "doc_repo_name | length > 0" - name: Add pdf_name to parameters ansible.builtin.set_fact: convert_params: "{{ convert_params }} --pdf-name {{ doc_pdf_name }}" - when: "doc_pdf_name is defined" + when: + - "doc_pdf_name is defined" + - "doc_pdf_name | length > 0" - name: Add templates-location to parameters ansible.builtin.set_fact: diff --git a/templates/conf.py b/templates/conf.py index 3c186547..55b6862f 100644 --- a/templates/conf.py +++ b/templates/conf.py @@ -78,7 +78,7 @@ html_theme = 'otcdocs' # further. For a list of options available for each theme, see the # documentation. html_theme_options = { - "disable_search": "True", + "disable_search": True, "site_name": "Internal Documentation Portal", "logo_url": "https://docs-int.otc-service.com", }