In this course, you learned how to quickly build documentation for a Python package based on Markdown files and docstrings using MkDocs and mkdocstrings.
You created a partly auto-generated documentation for your Python project by linking information in your docstrings to the documentation pages. Not content to rest at this, you added additional documentation pages that made your project more appealing to users by guiding them through examples and use cases.
You styled your documentation with the Material for MkDocs theme and deployed it to the Internet through GitHub Pages.
In this course, you learned how to:
- Write docstrings for your code objects
- Work with MkDocs to produce static pages from Markdown
- Pull in code documentation from docstrings using mkdocstrings
- Follow best practices for project documentation
- Customize your documentation using the Material for MkDocs theme
- Deploy your documentation on GitHub Pages
Building your project documentation using MkDocs and mkdocstrings allows you to write Markdown and auto-generate parts of the documentation directly from your docstrings. This setup means that you can create excellent documentation with less effort.
If you’re looking for next steps, then consider:
- Adding a code of conduct
- Adding a license
- Setting guidelines for contributors
- Exploring advanced MkDocs configuration
- Adding relative links to your docstrings
- Customizing the Materials for MkDocs theme
- Automating your deployment with GitHub Actions
- Publishing your project to PyPI
- Python’s doctest: Document and Test Your Code at Once
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.