|
6 | 6 |
|
7 | 7 | # -- Project information -----------------------------------------------------
|
8 | 8 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
9 |
| - |
10 |
| -import os |
| 9 | +from pathlib import Path |
11 | 10 | import time
|
12 | 11 | import sys
|
13 | 12 |
|
14 | 13 | from importlib.metadata import metadata
|
15 | 14 |
|
| 15 | +# Need to make sure that krank can be imported, and also that |
| 16 | +# it is importing the local one (as opposed to a previously pip installed one). |
| 17 | +# So this can be from the krank/src/krank directory or through a locally |
| 18 | +# built or locally pip installed version. |
| 19 | +# |
16 | 20 | # autodoc needs to import your modules in order to extract the docstrings.
|
17 | 21 | # Therefore, you must add the appropriate path to sys.path in your conf.py.
|
18 |
| -# sys.path.insert(0, os.path.abspath("../krank/src")) |
19 |
| - |
| 22 | +sys.path.insert(0, str(Path(__file__).parents[1].joinpath("src"))) |
20 | 23 | import krank
|
21 | 24 |
|
| 25 | + |
22 | 26 | project = krank.__name__
|
23 | 27 | release = krank.__version__ # Full project version
|
24 | 28 | version = krank.__version__[:3] # Major project version
|
|
106 | 110 | {"name": "Contributing", "url": "https://github.com/remrama/krank#contributing"},
|
107 | 111 | ],
|
108 | 112 | "header_links_before_dropdown": 4,
|
| 113 | + "navbar_start": ["navbar-icon-links", "navbar-logo", "version-switcher"], |
| 114 | + "navbar_center": ["navbar-nav"], |
| 115 | + "navbar_end": [], # equivalent to just icon-links? |
| 116 | + # "navbar_persistent": [], # Default is a nice search bubble that I otherwise don't get |
| 117 | + "search_bar_text": "Search...", |
| 118 | + # "article_header_start": ["breadcrumbs"], |
| 119 | + # "article_header_end": [], |
| 120 | + # "article_footer_items": [], |
| 121 | + "footer_start": ["last-updated"], # "search-field" "search-button" |
| 122 | + "footer_center": [], |
| 123 | + "footer_end": [], # "theme-switcher" |
| 124 | + "content_footer_items": [], |
| 125 | + "show_prev_next": False, |
109 | 126 | # "sidebarwidth": 230,
|
110 | 127 | # "navbar_start": ["navbar-logo", "version-switcher"],
|
111 | 128 | "show_version_warning_banner": True,
|
112 | 129 | "announcement": "BEWARE! This project is in the <a href='https://github.com/remrama/krank'>planning stage</a>.",
|
113 |
| - # "navbar_end": ["theme-switcher", "navbar-icon-links"], |
114 |
| - "navbar_end": ["navbar-icon-links"], |
115 |
| - # "navbar_end": ["theme-switcher", "navbar-icon-links", "search-field"], |
116 |
| - # "search_bar_text": "Search for something...", |
117 | 130 | "navbar_align": "left", # [left, content, right] For testing that the navbar items align properly
|
118 | 131 | "show_nav_level": 3,
|
119 | 132 | "show_toc_level": 3,
|
|
126 | 139 | # "icon_links_label": "Quick Links",
|
127 | 140 | "icon_links": [
|
128 | 141 | {
|
129 |
| - "name": "GitHub", |
| 142 | + "name": "Krank on GitHub", |
130 | 143 | "url": "https://github.com/remrama/krank",
|
131 | 144 | "icon": "fa-brands fa-square-github",
|
132 | 145 | "type": "fontawesome",
|
|
0 commit comments