|
| 1 | +# SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | + |
| 16 | +# Copyright (c) 2024, NVIDIA CORPORATION. |
| 17 | + |
| 18 | +from datetime import date |
| 19 | +from pathlib import Path |
| 20 | + |
| 21 | +from toml import load |
| 22 | + |
| 23 | +project = "NeMo Guardrails Product Documentation" |
| 24 | +this_year = date.today().year |
| 25 | +copyright = f"2023-{this_year}, NVIDIA Corporation" |
| 26 | +author = "NVIDIA Corporation" |
| 27 | +release = "0.0.0" |
| 28 | + |
| 29 | +with open( |
| 30 | + Path(__file__).parent.parent.parent / "pyproject.toml", encoding="utf-8" |
| 31 | +) as f: |
| 32 | + t = load(f) |
| 33 | + release = t.get("tool").get("poetry").get("version") |
| 34 | + |
| 35 | +extensions = [ |
| 36 | + "myst_parser", |
| 37 | + "sphinx.ext.intersphinx", |
| 38 | + "sphinx_copybutton", |
| 39 | + "sphinx_reredirects", |
| 40 | + "sphinx_design", |
| 41 | +] |
| 42 | + |
| 43 | +copybutton_exclude = ".linenos, .gp, .go" |
| 44 | + |
| 45 | +myst_linkify_fuzzy_links = False |
| 46 | +myst_heading_anchors = 3 |
| 47 | +myst_enable_extensions = [ |
| 48 | + "deflist", |
| 49 | + "dollarmath", |
| 50 | + "fieldlist", |
| 51 | + "substitution", |
| 52 | + "colon_fence", |
| 53 | +] |
| 54 | + |
| 55 | +myst_substitutions = { |
| 56 | + "version": release, |
| 57 | +} |
| 58 | + |
| 59 | +exclude_patterns = [ |
| 60 | + "_build/**", |
| 61 | +] |
| 62 | + |
| 63 | +# intersphinx_mapping = { |
| 64 | +# 'gpu-op': ('https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest', None), |
| 65 | +# } |
| 66 | + |
| 67 | +# suppress_warnings = ["etoc.toctree", "myst.header", "misc.highlighting_failure"] |
| 68 | + |
| 69 | +html_theme = "nvidia_sphinx_theme" |
| 70 | +html_copy_source = False |
| 71 | +html_show_sourcelink = False |
| 72 | +html_show_sphinx = False |
| 73 | + |
| 74 | +html_domain_indices = False |
| 75 | +html_use_index = False |
| 76 | +html_extra_path = ["project.json", "versions1.json"] |
| 77 | +highlight_language = "console" |
| 78 | + |
| 79 | +html_theme_options = { |
| 80 | + "icon_links": [], |
| 81 | + "switcher": { |
| 82 | + "json_url": "../versions1.json", |
| 83 | + "version_match": release, |
| 84 | + }, |
| 85 | + "secondary_sidebar_items": [], |
| 86 | + "primary_sidebar_end": [], |
| 87 | +} |
| 88 | +html_sidebars = {"**": []} |
| 89 | + |
| 90 | +html_baseurl = "https://docs.nvidia.com/nemo/guardrails/community/latest/" |
0 commit comments