Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: clarifying MAPDL commands API section #3071

Merged
merged 13 commits into from
May 7, 2024
Binary file added doc/source/_static/pyansys-logo-light_mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 26 additions & 13 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@

from datetime import datetime
import os
from pathlib import Path
import warnings

from ansys_sphinx_theme import (
ansys_favicon,
get_version_match,
pyansys_logo_black,
pyansys_logo_white,
)
from ansys_sphinx_theme import ansys_favicon, get_version_match
import numpy as np
import pyvista
from sphinx.application import Sphinx
Expand Down Expand Up @@ -62,14 +58,25 @@
USERNAME = "ansys"
BRANCH = "main"


DEFAULT_EXAMPLE_EXTENSION = "py"
GALLERY_EXAMPLES_PATH = "examples/gallery_examples"
SOURCE_PATH = Path(__file__).parent.resolve().absolute()
DOC_PATH = SOURCE_PATH.parent.absolute()
REPO_PATH = str(DOC_PATH.parent.absolute())

GALLERY_EXAMPLES_PATH = str(os.path.join(SOURCE_PATH, "examples", "gallery_examples"))
germa89 marked this conversation as resolved.
Show resolved Hide resolved

EXAMPLES_ROOT = "examples"
EXAMPLES_PATH_FOR_DOCS = f"../../{EXAMPLES_ROOT}/"
DOC_PATH = "doc/source"

SEARCH_HINTS = ["def", "class"]

pyansys_light_mode_logo = str(
os.path.join(SOURCE_PATH, "_static", "pyansys-logo-light_mode.png")
)
pyansys_dark_mode_logo = str(
os.path.join(SOURCE_PATH, "_static", "pyansys-logo-dark_mode.png")
)

# -- General configuration ---------------------------------------------------
extensions = [
"jupyter_sphinx",
Expand Down Expand Up @@ -200,7 +207,8 @@

# Setting redicts
redirects = {
# old linK: https://dev.mapdl.docs.pyansys.com/user_guide/krylov.html
#
# Old link: https://dev.mapdl.docs.pyansys.com/user_guide/krylov.html
"user_guide/krylov": "examples/extended_examples/Krylov/krylov_example"
}

Expand Down Expand Up @@ -258,7 +266,7 @@
"ignore_pattern": "flycheck*",
"thumbnail_size": (350, 350),
"remove_config_comments": True,
"default_thumb_file": pyansys_logo_white,
"default_thumb_file": pyansys_light_mode_logo,
"show_signature": False,
}
# ---
Expand All @@ -267,7 +275,7 @@
# -- Options for HTML output -------------------------------------------------
html_short_title = html_title = "PyMAPDL"
html_theme = "ansys_sphinx_theme"
html_logo = pyansys_logo_black
html_logo = pyansys_dark_mode_logo
html_theme_options = {
"analytics": {"google_analytics_id": "G-JQJKPV6ZVB"},
"github_url": f"https://github.com/{USERNAME}/{REPOSITORY_NAME}",
Expand Down Expand Up @@ -308,11 +316,16 @@
"github_user": USERNAME,
"github_repo": REPOSITORY_NAME,
"github_version": BRANCH,
"doc_path": DOC_PATH,
"doc_path": str(DOC_PATH),
"source_path": "src",
}
html_show_sourcelink = False

html_sidebars = {
"mapdl_commands/**/**": [],
"mapdl_commands/index": [],
}

# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
Expand Down
Loading