diff --git a/requirements.txt b/requirements.txt index c08f5e5..566e7f5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,6 +18,7 @@ roman-numerals==4.1.0 snowballstemmer==3.0.1 Sphinx==9.1.0 sphinx-autobuild==2025.8.25 +sphinx-copybutton==0.5.2 sphinx_rtd_theme==3.1.0 sphinxcontrib-applehelp==2.0.0 sphinxcontrib-devhelp==2.0.0 diff --git a/source/_templates/layout.html b/source/_templates/layout.html new file mode 100644 index 0000000..c1ee910 --- /dev/null +++ b/source/_templates/layout.html @@ -0,0 +1,13 @@ +{% extends "!layout.html" %} + +{% block extrahead %} + {{ super() }} + + + +{% endblock %} \ No newline at end of file diff --git a/source/conf.py b/source/conf.py index ff53505..9d4396c 100644 --- a/source/conf.py +++ b/source/conf.py @@ -6,20 +6,20 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -project = 'Sphinx Demo' -copyright = '2026, Xarkam' -author = 'Xarkam' +project = 'Jam.py' +copyright = '2022, Jam.py Team' +author = 'Andrew Yushev & Dean D. Babic' release = '0.0.1' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -extensions = ['sphinx.ext.autodoc','sphinx_rtd_theme'] +extensions = ['sphinx_rtd_theme', 'sphinx_copybutton', 'sphinx.ext.autodoc', 'sphinx.ext.linkcode', 'sphinx.ext.githubpages', 'sphinx_llms_txt'] templates_path = ['_templates'] -exclude_patterns = [] - +exclude_patterns = ['**/.git', 'Thumbs.db', '**/.venv', '**/.idea', '**/.mypy_cache', '**/build'] +googleanalytics_id = 'UA-122962025-6' # Provided by Google in your dashboard and need for html context below. # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output @@ -28,7 +28,6 @@ html_theme = 'sphinx_rtd_theme' html_static_path = ['_static'] html_theme_options = { - 'analytics_id': 'G-XXXXXXXXXX', # Provided by Google in your dashboard 'analytics_anonymize_ip': False, 'logo_only': False, 'prev_next_buttons_location': 'bottom', @@ -43,5 +42,35 @@ html_theme_options = { 'sticky_navigation': True, 'navigation_depth': 4, 'includehidden': True, - 'titles_only': False -} \ No newline at end of file + 'titles_only': False, +} + +html_static_path = ['source/_static'] + +html_theme_path = ['source/_templates'] + +html_css_files = ['source/_static/Jam.py.html_files/freemind2html.css'] + +html_favicon = 'source/_static/favicon.ico' + +html_last_updated_fmt = '%b %d, %Y' + +html_context = { + 'googleanalytics_id': googleanalytics_id, +} + +# -- Python link_code_resolve configuration + +def linkcode_resolve(domain, info): + """Map specific exceptions to specific files.""" + if domain != 'py': + return None + + mapping = { + 'LanguageNotFound': 'https://github.com/jam-py-v5/jam-py-v7/blob/master/jam/langs.py', + 'NetworkError': 'https://github.com/username/repo/blob/main/network.py', + 'FileError': 'https://github.com/username/repo/blob/main/file_ops.py', + } + + exception_name = info['fullname'] + return mapping.get(exception_name) \ No newline at end of file