This website is built using Material for MKDocs, a Material UI inspired theme for MKDocs.
To build and test the documentation locally:
-
Navigate to the
docs
directory:cd docs
-
Install the necessary dependencies:
pip install -r requirements.txt
-
In docs/ directory, run the command below to generate the API docs and index them:
cd docs/ python scripts/generate_api_docs.py python scripts/generate_api_summary.py
-
Run the build command:
mkdocs build
This will generate a static build of the documentation site in the site
directory. You can then serve this directory to view the site locally using:
mkdocs serve
If you see the build failing make sure to fix it before pushing.
We have automated build checks set up in our CI pipeline to ensure the documentation builds successfully before merging changes. These checks:
- Run the
mkdocs build
command - Verify that the build completes without errors
- Help catch potential issues early in the development process
If the CI build check fails, please review your changes and ensure the documentation builds correctly locally before pushing updates.
This guide is for contributors looking to make changes to the documentation in the dspy/docs
folder.
- Pull the up-to-date version of the website: Please pull the latest version of the live documentation site via its subtree repository with the following command:
#Ensure you are in the top-level dspy/ folder
git subtree pull --prefix=docs https://github.com/krypticmouse/dspy-docs master
-
Push your new changes on a new branch: Feel free to add or edit existing documentation and open a PR for your changes. Once your PR is reviewed and approved, the changes will be ready to merge into main.
-
Updating the website: Once your changes are merged to main, the changes would be reflected on live websites usually in 5-15 mins.