From 295b89bd3197d4c5a66f5ad94119524c35b7aa9f Mon Sep 17 00:00:00 2001 From: "Gode, Sebastian" Date: Thu, 24 Oct 2024 16:19:51 +0000 Subject: [PATCH] update confpy template for PDF Reviewed-by: Hasko, Vladimir Co-authored-by: Gode, Sebastian Co-committed-by: Gode, Sebastian --- metadata.yaml | 25 ------------------------- templates/conf.py | 9 +++++++++ 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/metadata.yaml b/metadata.yaml index 71b26125..5b3e1e84 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -1760,31 +1760,6 @@ categories: - name: docs-database-rw permission: write repository: docs/gaussdb-mysql - - service_title: GaussDB NoSQL - service_type: gaussdb_nosql - service_category: database - service_environment: internal - docs: - - html_location: docs/gaussdb_nosql/api-ref - rst_location: api-ref/source - title: API Reference - type: api-ref - link: /gaussdb-nosql/api-ref/ - pdf_name: gaussdb_nosql-api-ref - hc_location: api/nosql - disable_import: false - - html_location: docs/gaussdb_nosql/umn - rst_location: umn/source - title: User Guide - type: umn - link: /gaussdb-nosql/umn/ - pdf_name: gauss_nosql - hc_location: usermanual/nosql - disable_import: false - teams: - - name: docs-database-rw - permission: write - repository: docs/gaussdb-nosql - service_title: GeminiDB service_type: geminidb service_category: database diff --git a/templates/conf.py b/templates/conf.py index d7d040e6..632bb34b 100644 --- a/templates/conf.py +++ b/templates/conf.py @@ -106,6 +106,7 @@ html_title = "{{ title }}" # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] +templates_path = ['_templates'] # Do not include sources into the rendered results html_copy_source = False @@ -125,3 +126,11 @@ repo = Repo(search_parent_directories=True) commit = repo.head.commit current_commit_hash = commit.hexsha current_commit_time = commit.committed_datetime.strftime('%Y-%m-%d %H:%M') + +latex_elements = { + 'papersize': 'a4paper', + 'pointsize': '12pt', + 'figure_align': 'H', + 'preamble': r'\newcommand{\githash}{' + current_commit_hash + '}', + 'sphinxsetup': 'hmargin={15mm,15mm}, vmargin={20mm,30mm}, marginpar=10mm' +}