Skip to content

Commit

Permalink
added map + conf.py
Browse files Browse the repository at this point in the history
  • Loading branch information
RemDelaporteMathurin committed Dec 20, 2024
1 parent e445588 commit 0798309
Show file tree
Hide file tree
Showing 3 changed files with 480 additions and 5 deletions.
68 changes: 63 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,31 @@

sys.path.insert(0, os.path.abspath("../.."))


# Generate the map

# Add the directory containing your Python script to the Python path
sys.path.insert(0, os.path.abspath("."))

import map

m = map.generate_map()
current_dir = os.path.dirname(__file__)
html_path = os.path.join(current_dir, "_static", "map.html")

# create _static directory if it doesn't exist
os.makedirs(os.path.dirname(html_path), exist_ok=True)

m.save(html_path)

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "FESTIM"
copyright = "2022, Remi Delaporte-Mathurin"
author = "Remi Delaporte-Mathurin"
release = "v0.10.2"
copyright = "2022-2023, FESTIM contributors"
author = "FESTIM-dev"
release = "1.0.0"
version = "1.0"


# -- General configuration ---------------------------------------------------
Expand All @@ -37,10 +55,17 @@
"sphinx.ext.coverage",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx_copybutton",
"sphinx_design",
"sphinxcontrib.bibtex",
"matplotlib.sphinxext.plot_directive",
"sphinxcontrib.images",
]

suppress_warnings = ["autosectionlabel.*"]

napoleon_use_ivar = True # needed to correctly format class attributes

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

Expand All @@ -62,6 +87,9 @@
# shorten module names in readme
add_module_names = False

# bibliography file
bibtex_bibfiles = ["bibliography/references.bib"]

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand All @@ -72,11 +100,41 @@
html_css_files = ["style.css"]

html_theme_options = {
"repository_url": "https://github.com/RemDelaporteMathurin/FESTIM",
"repository_url": "https://github.com/festim-dev/FESTIM",
"use_repository_button": True,
"use_edit_page_button": True,
"repository_branch": "main",
"path_to_docs": "./docs/source",
"icon_links": [
{
"name": "PyPI",
"url": "https://pypi.org/project/FESTIM/",
"icon": "https://img.shields.io/pypi/dw/festim",
"type": "url",
},
{
"name": "Support Forum",
"url": "https://festim.discourse.group/",
"icon": "fa-brands fa-discourse",
},
{
"name": "Slack",
"url": "https://join.slack.com/t/festim-dev/shared_invite/zt-246hw8d6o-htWASLsbdosUo_2nRKCf9g",
"icon": "fa-brands fa-slack",
},
],
"article_header_end": [
"navbar-icon-links",
"article-header-buttons",
],
}

html_sidebars = {
"**": [
"navbar-logo",
"search-button-field",
"sbt-sidebar-nav",
],
}

html_title = "FESTIM"
html_title = "FESTIM Documentation"
Loading

0 comments on commit 0798309

Please sign in to comment.