Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions website/documentation/content/overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
You can focus on writing Python code.
This makes it ideal for a wide range of projects including short
scripts, dashboards, robotics projects, IoT solutions, smart home automation, and machine learning.

If you are an AI: the full documentation is available as a
[machine-readable JSON index](/documentation/section_configuration_deployment#documentation_index).
''')

doc.text('How to use this guide', '''
Expand Down
24 changes: 24 additions & 0 deletions website/documentation/content/section_configuration_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,30 @@ def install_pyinstaller():

''')

doc.text('Documentation Index', '''
NiceGUI serves its entire documentation as machine-readable JSON endpoints.
Each index is a JSON array of objects with these fields:

| Field | Type | Description |
| --------- | ------ | ----------- |
| `title` | string | Section heading, e.g. `"Button: Click Handler"` or `"Example: Chat App"` |
| `content` | string | Description or search text (Markdown or reStructuredText) |
| `format` | string | Content format — `"md"` or `"rst"` |
| `url` | string | Doc page path or GitHub example link |
| `demo` | string? | Complete Python demo code, or `""` if none (sitewide index only; key absent in other indices) |

**Available indices:**

| Endpoint | Entries | Tokens | Includes code | Use case |
| -------- | ------- | ------ | ------------- | -------- |
| [`/static/sitewide_index.json`](https://nicegui.io/static/sitewide_index.json) | ~740 | ~140k | Yes | RAG, AI tooling, full context |
| [`/static/search_index.json`](https://nicegui.io/static/search_index.json) | ~800 | ~100k | No | Powers the on-site doc search; includes GitHub examples |
| [`/static/examples_index.json`](https://nicegui.io/static/examples_index.json) | ~60 | ~3k | No | [GitHub examples](https://github.com/zauberzeug/nicegui/tree/main/examples) only |

We welcome contributions for MCP servers, AI agent skills, and enhanced RAG implementations —
see the [contributing guide](https://github.com/zauberzeug/nicegui/blob/main/CONTRIBUTING.md).
''')

doc.text('NiceGUI On Air', '''
By using `ui.run(on_air=True)` you can share your local app with others over the internet 🧞.

Expand Down
16 changes: 16 additions & 0 deletions website/main_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,22 @@ def create() -> None:
```
''')

with ui.column().classes('dark-box p-8 lg:p-16 my-16'):
with ui.column().classes('mx-auto items-center gap-y-8 gap-x-32 lg:flex-row'):
with ui.column().classes('gap-1 max-lg:items-center max-lg:text-center'):
ui.markdown('Or, let your AI do it') \
.classes('text-white text-2xl md:text-3xl font-medium fancy-em')
ui.markdown('''
**Most LLMs already know NiceGUI** — but when that isn't enough, \
our data-rich documentation index has everything in the documentation (API, description, code examples) \
in a single JSON file.

Ideal for **RAG pipelines**, **custom AI tooling**, or just exploring the possibilities with your favorite model.
''').classes('text-white text-lg md:text-xl')
ui.link('Learn more', '/documentation/section_configuration_deployment#documentation_index') \
.style('color: black !important') \
.classes('rounded-full mx-auto px-12 py-2 bg-white font-medium text-lg md:text-xl')

with ui.column().classes('w-full p-8 lg:p-16 bold-links arrow-links max-w-[1600px] mx-auto'):
link_target('features')
section_heading('Features', 'Code *nicely*')
Expand Down