Skip to content

Commit 0ce9ff7

Browse files
MaStrclaude
andauthored
docs: generate llms.txt and llms-full.txt via mkdocs-llmstxt plugin (#387)
* docs: add mkdocs-llmstxt plugin to generate llms.txt and llms-full.txt Adds the mkdocs-llmstxt plugin which generates /llms.txt and /llms-full.txt at build time from the existing documentation pages. Both files are served via GitHub Pages and linked from the docs index. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * fix: restrict mkdocs-llmstxt to Python >=3.10 to satisfy uv resolver mkdocs-llmstxt 0.5.0 requires Python >=3.10 but the project declares requires-python >3.8. uv resolves all extras for the full version range, causing the dependency to be unsatisfiable for 3.8/3.9 splits even when only [test] is installed. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * fix: address Copilot review comments on llmstxt plugin PR - Add upper version bound <1.0 to mkdocs-llmstxt in pyproject.toml and docs.yml - Use absolute GitHub Pages URLs for llms.txt/llms-full.txt links in index.md to avoid MkDocs strict-mode failures (files are generated post-build and unknown to the link validator) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent 60895d1 commit 0ce9ff7

4 files changed

Lines changed: 39 additions & 1 deletion

File tree

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
python-version: '3.12'
3434

3535
- name: Install documentation dependencies
36-
run: pip install "mkdocs-material>=9.5,<10"
36+
run: pip install "mkdocs-material>=9.5,<10" "mkdocs-llmstxt>=0.5.0,<1.0"
3737

3838
- name: Build documentation
3939
run: mkdocs build --strict

docs/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,8 @@ config/
9393
📝 **Documentation Status**: This documentation lives in the [`docs/` folder of the batcontrol repository](https://github.com/MaStr/batcontrol/tree/main/docs). If you find outdated information or need additional details, please open an issue or pull request.
9494

9595
🔗 **Project Repository**: [GitHub - Batcontrol](https://github.com/MaStr/batcontrol)
96+
97+
---
98+
99+
**LLM-friendly versions of this documentation:**
100+
[llms.txt](https://mastr.github.io/batcontrol/llms.txt)[llms-full.txt](https://mastr.github.io/batcontrol/llms-full.txt)

mkdocs.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,38 @@ markdown_extensions:
4747

4848
plugins:
4949
- search
50+
- llmstxt:
51+
markdown_description: |
52+
Batcontrol controls a PV battery inverter based on dynamic electricity prices,
53+
solar production forecasts, and consumption patterns. It charges from the grid
54+
when prices are low and preserves stored energy when prices are high. It supports
55+
Fronius Gen24 inverters (HTTP API and Modbus TCP) and any inverter via MQTT bridge.
56+
Tariff providers include Tibber, aWATTar, evcc, EnergyForecast.de, and static zone
57+
tariffs. Solar forecast sources include Forecast.Solar, Solar-Prognose.de, evcc,
58+
and Home Assistant Solar Forecast ML. Peak shaving distributes PV battery charging
59+
across the day using forecasts, and works with both dynamic and static tariffs.
60+
full_output: llms-full.txt
61+
sections:
62+
Getting Started:
63+
- getting-started/installation.md: Installation guide with pre-flight checklist, Docker setup, and next steps
64+
- getting-started/how-batcontrol-works.md: Architecture, control loop, forecasting system, and decision logic
65+
Configuration:
66+
- configuration/batcontrol-configuration.md: Main configuration file reference
67+
- configuration/inverter-configuration.md: Fronius Gen24, Fronius Modbus, and MQTT inverter configuration
68+
- configuration/dynamic-tariff-provider.md: Tibber, aWATTar, evcc, EnergyForecast, and static tariff zones
69+
- configuration/solar-forecast.md: Forecast.Solar, Solar-Prognose.de, evcc, and Home Assistant ML
70+
- configuration/consumption-forecast.md: CSV load profile and Home Assistant API forecast
71+
Features:
72+
- features/peak-shaving.md: Dynamic PV charge rate limiting to maximize solar absorption
73+
- features/battery-control-expert.md: Advanced tuning parameters
74+
- features/price-difference-calculation.md: How price thresholds are calculated
75+
Integrations:
76+
- integrations/mqtt-api.md: MQTT state publishing, runtime overrides, and Home Assistant auto-discovery
77+
- integrations/mqtt-inverter.md: Integrating any battery system via MQTT bridge
78+
- integrations/evcc-connection.md: Coordinating with EV charging via evcc
79+
- integrations/forecast-metrics.md: Forecast data exposed via MQTT
80+
Optional:
81+
- development/15-min-transform.md: Internal 15-minute interval resolution
5082

5183
nav:
5284
- Home: index.md

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ test = [
5555
]
5656
docs = [
5757
"mkdocs-material>=9.5,<10",
58+
"mkdocs-llmstxt>=0.5.0,<1.0; python_version >= '3.10'",
5859
]
5960

6061
# Bump Version

0 commit comments

Comments
 (0)