Skip to content

Commit

Permalink
Clarifying MAPDL commands API section (#3071)
Browse files Browse the repository at this point in the history
* tmp

* rebasing

* removing sidebar

* removing sidebar from MAPDL commands

* Using absolute paths

* Using pyansys logo with transparencies

* fixing logo path

* Removing toctree

* Update doc/source/conf.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* using previous setup

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
germa89 and pre-commit-ci[bot] committed May 7, 2024
1 parent 2f0bc84 commit dc0a56c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
Binary file added doc/source/_static/pyansys-logo-light_mode.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 23 additions & 12 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,23 @@
USERNAME = "ansys"
BRANCH = "main"


DEFAULT_EXAMPLE_EXTENSION = "py"

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

SEARCH_HINTS = ["def", "class"]

SOURCE_PATH = Path(__file__).parent.resolve().absolute()
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 +205,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 +264,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 +273,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 +314,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

0 comments on commit dc0a56c

Please sign in to comment.