|
| 1 | +#!/usr/bin/env python3 |
| 2 | +import os |
| 3 | +import sys |
| 4 | +from pathlib import Path |
| 5 | +# import sphinx_rtd_theme |
| 6 | +sys.path.append(os.path.abspath('./sphinx_ext/')) |
| 7 | + |
| 8 | +# |
| 9 | +# -- Project information ----------------------------------------------------- |
| 10 | +# |
| 11 | +project = "SGMD" |
| 12 | +copyright = 'Berkeley, CA' |
| 13 | +description = "Simulated Ground Motion Database" |
| 14 | +author = "PEER" |
| 15 | +#html_logo = "_static/images/xara.png" |
| 16 | +html_title = "SGMD" |
| 17 | +html_short_title = "SGMD" |
| 18 | + |
| 19 | +root_doc = "launch" #"user/index" |
| 20 | +html_additional_pages = {'index': 'home.html'} |
| 21 | +html_extra_path = ["robots.txt"] |
| 22 | + |
| 23 | +rst_prolog = """ |
| 24 | +.. |BRACE2| replace:: `BRACE2`_ |
| 25 | +.. _BRACE2: https://structures.live |
| 26 | +.. |cmp| replace:: `Claudio M. Perez`_ |
| 27 | +.. _Claudio M. Perez: https://stairlab.berkeley.edu/people/claudioperez |
| 28 | +
|
| 29 | +""" |
| 30 | + |
| 31 | +# Add any Sphinx extension module names here, as strings. They can be |
| 32 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 33 | +# ones. |
| 34 | +extensions = [ |
| 35 | + 'toctree_filter', |
| 36 | + 'myst_parser', |
| 37 | + 'sphinx.ext.mathjax', |
| 38 | + 'sphinx_copybutton', |
| 39 | + 'sphinx_tabs.tabs', |
| 40 | + "sphinx.ext.autosummary", |
| 41 | + 'sphinxcontrib.bibtex', |
| 42 | + 'sphinx_sitemap' |
| 43 | +] |
| 44 | +myst_enable_extensions = [ |
| 45 | + "amsmath", |
| 46 | + "attrs_inline", |
| 47 | + "colon_fence", |
| 48 | + "deflist", |
| 49 | + "dollarmath", |
| 50 | + "fieldlist", |
| 51 | +] |
| 52 | +bibtex_bibfiles = ["references.bib"] |
| 53 | + |
| 54 | +# Add any paths that contain templates here, relative to this directory. |
| 55 | +templates_path = ['_templates'] |
| 56 | +html_static_path = ['_static'] |
| 57 | + |
| 58 | +exclude_patterns = [ |
| 59 | + "_build", "Thumbs.db", ".DS_Store", "**/hidden", |
| 60 | +] |
| 61 | + |
| 62 | +# -- Options for HTML output ------------------------------------------------- |
| 63 | + |
| 64 | +html_baseurl = "https://sgmd.peer.berkeley.edu" |
| 65 | +sitemap_url_scheme = "{link}" |
| 66 | + |
| 67 | +html_theme = "sphinx_book_theme" #"pydata_sphinx_theme" #"sphinx_rtd_theme" |
| 68 | +html_show_sphinx = False |
| 69 | +html_show_sourcelink = False |
| 70 | + |
| 71 | +if True: |
| 72 | + html_theme_options = { |
| 73 | + # 'analytics_id': 'UA-2431545-1', |
| 74 | + # "body_max_width": None, |
| 75 | + "show_prev_next": False, |
| 76 | + "logo": { |
| 77 | +# "image_light": html_logo, |
| 78 | +# "image_dark": "_static/logo-dark.png", |
| 79 | + "link": html_baseurl, # "index.html", |
| 80 | + "text": f'<span class="lead display-3">{project}</span>', |
| 81 | +# "alt_text": "xara docs - Home", |
| 82 | + } |
| 83 | + } |
| 84 | + |
| 85 | +if "book" in html_theme: |
| 86 | + html_theme_options.update({ |
| 87 | + "use_download_button": False, |
| 88 | + "use_edit_page_button": False, |
| 89 | + "article_header_start": ["toggle-primary-sidebar.html", "breadcrumbs"] |
| 90 | + }) |
| 91 | + |
| 92 | +html_context = { |
| 93 | + "root_doc": root_doc, |
| 94 | + "description": description, |
| 95 | + "github_user": "peer-open-source", |
| 96 | +# "github_repo": "OpenSeesRT", |
| 97 | +# "doc_path": "<path-from-root-to-your-docs>", |
| 98 | + |
| 99 | + # HOME |
| 100 | + "examples": [], |
| 101 | + "features": [ |
| 102 | + {"title": "Fast", "body": "Core components have been refactored to leverage modern C++ features, which has furnished substantial performance improvements over the alternative serial OpenSees interpreters."}, |
| 103 | + {"title": "Free", "body": "All source code contributed to xara is licensed under a <em>pure</em> BSD."}, |
| 104 | + {"title": "Robust", "body": '<em>xara</em> is designed from the ground up for use in production environments like <a href="https://structures.live">structures.live</a>'}, |
| 105 | + ], |
| 106 | + "home_image": "_static/images/CableStayed02.png" |
| 107 | +} |
| 108 | + |
| 109 | +# 'style_nav_header_background': '#F2F2F2' #64B5F6 #607D8B, |
| 110 | + |
| 111 | +html_css_files = [ |
| 112 | + 'css/custom.css' |
| 113 | +] + [ |
| 114 | + 'css/home-css/'+str(file.name) for file in (Path(__file__).parents[0]/"_static/css/home-css/").glob("vars*.css") |
| 115 | +] + [ |
| 116 | + 'css/css/'+str(file.name) for file in (Path(__file__).parents[0]/"_static/css/css/").glob("*.css") |
| 117 | +] + [ |
| 118 | + "css/veux.css", |
| 119 | +] |
| 120 | + |
| 121 | +html_secnum_suffix = " " |
| 122 | + |
0 commit comments