Skip to content

Commit 5559865

Browse files
authored
Add llms.txt documentation support (#829)
1 parent c8b9bc0 commit 5559865

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

docs/conf.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
'sphinx.ext.napoleon',
4646
'sphinx.ext.coverage',
4747
'sphinx_copybutton',
48+
'sphinx_llms_txt',
4849
]
4950

5051
# Add any paths that contain templates here, relative to this directory.
@@ -91,9 +92,18 @@
9192

9293
html_logo = '_static/logo.svg'
9394
html_favicon = '_static/logo.svg'
95+
html_baseurl = 'https://ydb-platform.github.io/ydb-python-sdk/'
9496

9597
html_show_sourcelink = False
9698

99+
llms_txt_title = 'YDB Python SDK Documentation'
100+
llms_txt_summary = '''
101+
Official Python client documentation for YDB, covering connection setup,
102+
authentication, query execution, topic messaging, table operations,
103+
coordination primitives, error handling, and API reference.
104+
'''
105+
llms_txt_uri_template = '{base_url}{docname}.html'
106+
97107
# Theme options are theme-specific and customize the look and feel of a theme
98108
# further. For a list of options available for each theme, see the
99109
# documentation.

docs/index.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ SDK is accessed through a ``Driver`` instance, so this page is the foundation fo
5353
everything else.
5454

5555

56+
LLM-ready Documentation
57+
-----------------------
58+
59+
For AI-assisted coding, use `llms.txt <https://ydb-platform.github.io/ydb-python-sdk/llms.txt>`_
60+
as the documentation index and
61+
`llms-full.txt <https://ydb-platform.github.io/ydb-python-sdk/llms-full.txt>`_
62+
as the complete documentation context.
63+
64+
5665
Running Queries
5766
---------------
5867

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
sphinx_rtd_theme==2.0.0
22
sphinx-copybutton==0.5.2
3+
sphinx-llms-txt==0.7.1

0 commit comments

Comments
 (0)