From ec8a6e1c27e67364cdd28eb1c71e27f6fddc8536 Mon Sep 17 00:00:00 2001 From: gtema Date: Thu, 11 Aug 2022 14:17:34 +0000 Subject: [PATCH] Tune docs header Reviewed-by: Goncharov, Artem Co-authored-by: gtema Co-committed-by: gtema --- playbooks/pre.yaml | 1 - playbooks/run.yaml | 50 ---------------------------------------------- templates/conf.py | 7 +++++-- zuul.yaml | 2 ++ 4 files changed, 7 insertions(+), 53 deletions(-) diff --git a/playbooks/pre.yaml b/playbooks/pre.yaml index c37798c4a..8858bb60e 100644 --- a/playbooks/pre.yaml +++ b/playbooks/pre.yaml @@ -5,7 +5,6 @@ - ensure-pip - ensure-virtualenv - ensure-pandoc - - ensure-gh tasks: - name: Install convertor pip: diff --git a/playbooks/run.yaml b/playbooks/run.yaml index 1742c3fcb..2de251fbe 100644 --- a/playbooks/run.yaml +++ b/playbooks/run.yaml @@ -9,13 +9,6 @@ doc_exports_var: "{{ docs }}" cacheable: true - - name: Detect list of changes - command: "git log -1 --name-only --pretty=" - args: - chdir: "{{ zuul.project.src_dir }}" - register: git_log - ignore_errors: true - - name: Generate RSTs include_role: name: "convert_doc" @@ -31,46 +24,3 @@ loop_control: loop_var: "doc" label: "{{ doc.label }}" - when: "git_log.stdout is search(doc.html_location) or git_log.stdout is search('otc_doc_convertor') or git_log.stdout is search('playbooks')" - - # - name: Configure git user name - # command: "git config --global user.name 'OpenTelekomCloud Proposal Bot'" - # - # - name: Configure git user email - # command: "git config --global user.email otcbot@otc-service.com" - # - # - name: Restore to the previous git state - # command: "git checkout HEAD^1" - # args: - # chdir: "{{ zuul.project.src_dir }}" - # - # - name: Generate base RSTs - # include_role: - # name: "convert_doc" - # vars: - # doc_label: "{{ doc.label }}" - # dest: "{{ ansible_user_dir }}/{{ docs_rst_location }}/{{ doc.label }}/{{ docs_base_location }}" - # source: "{{ zuul.project.src_dir }}/{{ doc.html_location }}" - # loop: "{{ docs }}" - # loop_control: - # loop_var: "doc" - # label: "{{ doc.label }}" - # when: "git_log.stdout is search(doc.html_location) or git_log.stdout is search('otc_doc_convertor')" - # - # - name: Generate patch file - # include_role: - # name: "generate_doc_patch" - # vars: - # doc_label: "{{ doc.label }}" - # generate_doc_patch_base_location: "{{ docs_base_location }}" - # generate_doc_patch_new_location: "{{ docs_new_location }}" - # generate_doc_patch_repository: "{{ doc.repository }}" - # generate_doc_patch_project_location: "{{ doc.project_location }}" - # generate_doc_patch_base: "{{ ansible_user_dir }}/{{ docs_rst_location }}/{{ doc.label }}" - # generate_doc_patch_diff_patch_location: "{{ ansible_user_dir }}/{{ doc.label }}.patch" - # generate_doc_patch_git_patch_location: "{{ ansible_user_dir }}/{{ doc.label }}.git.patch" - # loop: "{{ docs }}" - # loop_control: - # loop_var: "doc" - # label: "{{ doc.label }}" - # when: "git_log.stdout is search(doc.html_location) or git_log.stdout is search('otc_doc_convertor')" diff --git a/templates/conf.py b/templates/conf.py index 5ab57950e..ad17d45ee 100644 --- a/templates/conf.py +++ b/templates/conf.py @@ -11,7 +11,7 @@ # under the License. # # !!! -# This file is generated out of template in doc-exports repository. +# This file is generated out of template in doc-exports repository. # Beware overwriting it locally. import os @@ -71,7 +71,10 @@ html_theme = 'otcdocs' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -html_theme_options = {} +html_theme_options = { + 'disable_search': True, + 'site_name': 'Internal Documentation Portal' +} # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". diff --git a/zuul.yaml b/zuul.yaml index 26238263d..4fedf8ee6 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -22,6 +22,7 @@ - docs/ecs - docs/ims - roles + - templates provides: otc-doc-exports-convert-compute vars: docs_update_data_file: "docs_compute.yaml" @@ -36,6 +37,7 @@ - otc_doc_convertor - docs/modelarts - roles + - templates vars: docs_update_data_file: "docs_big-data.yaml"