forked from infra/otc-metadata
Added search index params on confpy
Reviewed-by: tischrei <tino.schreiber@t-systems.com> Co-authored-by: Gode, Sebastian <sebastian.gode@t-systems.com> Co-committed-by: Gode, Sebastian <sebastian.gode@t-systems.com>
This commit is contained in:
parent
b8f397e3e1
commit
59917cac1f
@ -37,6 +37,15 @@ otcdocs_git_fqdn = '{{ git_fqdn }}'
|
||||
otcdocs_git_type = '{{ git_type }}'
|
||||
{%- endif %}
|
||||
|
||||
# Those variables are needed for indexing into OpenSearch
|
||||
otcdocs_doc_environment = '{{ doc_environment }}'
|
||||
otcdocs_doc_link = '{{ doc_link }}'
|
||||
otcdocs_doc_title = '{{ doc_title }}'
|
||||
otcdocs_doc_type = '{{ doc_type }}'
|
||||
otcdocs_service_category = '{{ service_category }}'
|
||||
otcdocs_service_title = '{{ service_title }}'
|
||||
otcdocs_service_type = '{{ service_type }}'
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
|
@ -150,6 +150,23 @@ def process_repositories(args, service):
|
||||
site_name="Internal Documentation Portal",
|
||||
logo_url="https://docs-int.otc-service.com",
|
||||
)
|
||||
context["doc_environment"] = args.target_environment
|
||||
if doc['link']:
|
||||
context["doc_link"] = doc['link']
|
||||
else:
|
||||
context["doc_link"] = (
|
||||
'/'
|
||||
+ service['service_uri']
|
||||
+ '/'
|
||||
+ doc['type']
|
||||
+ '/'
|
||||
)
|
||||
context["doc_title"] = doc['title']
|
||||
context["doc_type"] = doc['type']
|
||||
context["service_category"] = service['service_category']
|
||||
context["service_title"] = service['service_title']
|
||||
context["service_type"] = service['service_type']
|
||||
|
||||
conf_py_content = conf_py_template.render(**context)
|
||||
with open(conf_py_path, "w", encoding="utf-8", newline="") as out:
|
||||
logging.debug(f"Generating {conf_py_path} from template...")
|
||||
|
Loading…
x
Reference in New Issue
Block a user