forked from infra/otc-metadata
Compare commits
4 Commits
main
...
search_ind
Author | SHA1 | Date | |
---|---|---|---|
6994dd37f7 | |||
![]() |
6d5be1ad29 | ||
![]() |
9a3ea95018 | ||
![]() |
22594ecced |
@ -37,6 +37,15 @@ otcdocs_git_fqdn = '{{ git_fqdn }}'
|
|||||||
otcdocs_git_type = '{{ git_type }}'
|
otcdocs_git_type = '{{ git_type }}'
|
||||||
{%- endif %}
|
{%- 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,
|
# 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
|
# 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.
|
# 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",
|
site_name="Internal Documentation Portal",
|
||||||
logo_url="https://docs-int.otc-service.com",
|
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)
|
conf_py_content = conf_py_template.render(**context)
|
||||||
with open(conf_py_path, "w", encoding="utf-8", newline="") as out:
|
with open(conf_py_path, "w", encoding="utf-8", newline="") as out:
|
||||||
logging.debug(f"Generating {conf_py_path} from template...")
|
logging.debug(f"Generating {conf_py_path} from template...")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user