|
30 | 30 | "autosectionlabel.*", |
31 | 31 | "ref.python", # TODO: remove when https://github.com/sphinx-doc/sphinx/issues/4961 is fixed |
32 | 32 | ] |
| 33 | + |
33 | 34 | # -- General configuration --------------------------------------------------- |
34 | 35 | extensions = [ |
35 | | - "sphinx.ext.intersphinx", |
| 36 | + # Sphinx core extensions |
36 | 37 | "sphinx.ext.autodoc", |
37 | | - "sphinx.ext.napoleon", |
38 | 38 | "sphinx.ext.autosectionlabel", |
39 | 39 | "sphinx.ext.githubpages", |
| 40 | + "sphinx.ext.intersphinx", |
| 41 | + "sphinx.ext.napoleon", |
| 42 | + "sphinx.ext.todo", |
40 | 43 | "sphinx.ext.viewcode", |
| 44 | + # Custom extensions |
41 | 45 | "tools.sphinx_ext.missing_references", |
42 | 46 | "tools.sphinx_ext.changelog", |
| 47 | + # Third-party extensions |
43 | 48 | "sphinx_autodoc_typehints", |
44 | 49 | "myst_parser", |
45 | 50 | "auto_pytabs.sphinx_ext", |
46 | 51 | "sphinx_copybutton", |
47 | | - "sphinx.ext.todo", |
48 | | - "sphinx.ext.viewcode", |
49 | 52 | "sphinx_click", |
50 | 53 | "sphinx_toolbox.collapse", |
51 | 54 | "sphinx_design", |
|
67 | 70 | "sanic": ("https://sanic.readthedocs.io/en/latest/", None), |
68 | 71 | "flask": ("https://flask.palletsprojects.com/en/stable/", None), |
69 | 72 | "typing_extensions": ("https://typing-extensions.readthedocs.io/en/stable/", None), |
| 73 | + "attrs": ("https://www.attrs.org/en/stable/", None), |
| 74 | + "pytest": ("https://docs.pytest.org/en/stable/", None), |
70 | 75 | } |
71 | | -PY_CLASS = "py:class" |
72 | | -PY_EXC = "py:exc" |
73 | | -PY_RE = r"py:.*" |
74 | | -PY_METH = "py:meth" |
75 | | -PY_ATTR = "py:attr" |
76 | | -PY_OBJ = "py:obj" |
77 | | -PY_FUNC = "py:func" |
78 | 76 | nitpicky = True |
79 | 77 | nitpick_ignore: list[str] = [] |
80 | 78 | nitpick_ignore_regex: list[str] = [] |
|
94 | 92 | autodoc_default_options = {"special-members": "__init__", "show-inheritance": True, "members": True} |
95 | 93 | autodoc_member_order = "bysource" |
96 | 94 | autodoc_typehints_format = "short" |
| 95 | +autodoc_typehints = "both" |
| 96 | +autodoc_preserve_defaults = True |
97 | 97 | autodoc_type_aliases = { |
98 | 98 | "ModelT": "advanced_alchemy.repository.typing.ModelT", |
99 | 99 | "FilterTypeT": "advanced_alchemy.filters.FilterTypeT", |
|
170 | 170 | "_sa.create_engine._sphinx_paramlinks_creator", |
171 | 171 | "sqlalchemy.Dialect", |
172 | 172 | "sqlalchemy.orm.MetaData", |
173 | | - # Add these new entries: |
174 | 173 | "advanced_alchemy.config.engine.EngineConfig", |
175 | 174 | "advanced_alchemy.config.asyncio.AsyncSessionConfig", |
176 | 175 | "advanced_alchemy.config.sync.SyncSessionConfig", |
|
209 | 208 | html_static_path = ["_static"] |
210 | 209 | html_favicon = "_static/favicon.png" |
211 | 210 | templates_path = ["_templates"] |
212 | | -html_js_files = ["versioning.js"] |
213 | 211 | html_css_files = ["custom.css", "syntax-highlighting.css"] |
214 | 212 | exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "PYPI_README.md", "guides/**"] |
215 | 213 | html_show_sourcelink = True |
216 | 214 | html_copy_source = True |
217 | 215 |
|
| 216 | +# Add SEO-friendly meta tags |
| 217 | +html_meta = { |
| 218 | + "description": "Advanced Alchemy - A carefully crafted, thoroughly tested, optimized companion library for SQLAlchemy", |
| 219 | + "keywords": "sqlalchemy, orm, alembic, python, database, litestar, repository-pattern, fastapi, starlette", |
| 220 | + "author": "Litestar Organization", |
| 221 | + "og:title": "Advanced Alchemy Documentation", |
| 222 | + "og:type": "website", |
| 223 | + "og:description": "Advanced Alchemy - A carefully crafted, thoroughly tested, optimized companion library for SQLAlchemy", |
| 224 | + "og:site_name": "Advanced Alchemy", |
| 225 | + "twitter:card": "summary", |
| 226 | +} |
| 227 | + |
218 | 228 | html_context = { |
219 | 229 | "source_type": "github", |
220 | 230 | "source_user": "litestar-org", |
|
0 commit comments