|
| 1 | +# Below we grab the current date and time using python |
| 2 | +# this is used to them support the copyright date always being the current year |
| 3 | +# when you build your docs |
| 4 | +import subprocess |
| 5 | +from datetime import datetime |
| 6 | + |
| 7 | +current_year = datetime.now().year |
| 8 | +organization_name = "pyOpenSci" |
| 9 | + |
| 10 | + |
| 11 | +project = "pyosPackage" |
| 12 | +copyright = f"{current_year}, {organization_name}" |
| 13 | +author = "pyOpenSci Community" |
| 14 | + |
| 15 | +# *********** RELEASE NUMBER ************** |
| 16 | +# This is optional - if you want the release of your docs to align with your |
| 17 | +# package release cycle then the code below will get the recent tag and use |
| 18 | +# that to generate your documentation release value. |
| 19 | +try: |
| 20 | + release_value = ( |
| 21 | + subprocess.check_output(["git", "describe", "--tags"]) |
| 22 | + .decode("utf-8") |
| 23 | + .strip() |
| 24 | + ) |
| 25 | + release_value = release_value[:4] |
| 26 | +except subprocess.CalledProcessError: |
| 27 | + release_value = "0.1" # Default value in case there's no tag |
| 28 | + |
| 29 | +# Update the release value |
| 30 | +release = release_value |
| 31 | + |
| 32 | + |
| 33 | +release = "1.10" |
| 34 | + |
| 35 | +# -- General configuration --------------------------------------------------- |
| 36 | +# Extensions add additional functionality to your documentation. |
| 37 | +# TODO: describe each extension below |
| 38 | +extensions = [ |
| 39 | + "sphinx_design", |
| 40 | + "sphinx_copybutton", |
| 41 | + "sphinx.ext.intersphinx", |
| 42 | + # This allows you to create :::{todo} sections that will not be rendered |
| 43 | + # in the live docs |
| 44 | + "sphinx.ext.todo", |
| 45 | + "myst_parser", |
| 46 | +] |
| 47 | + |
| 48 | + |
| 49 | +templates_path = ["_templates"] |
| 50 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
| 51 | + |
| 52 | +# ****** setup MYST ****** |
| 53 | +# colon fence for card support in md |
| 54 | +myst_enable_extensions = [ |
| 55 | + "colon_fence", |
| 56 | + "deflist", |
| 57 | + "attrs_block", |
| 58 | +] |
| 59 | +myst_heading_anchors = 3 |
| 60 | +myst_footnote_transition = False |
| 61 | + |
| 62 | +# -- Options for HTML output ------------------------------------------------- |
| 63 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
| 64 | + |
| 65 | +html_theme = "pydata_sphinx_theme" |
| 66 | +html_static_path = ["_static"] |
0 commit comments