This repository can be used as a template for building beautiful pages with Material for MkDocs and is the main resource for ECRI's Publishing Software Projects for Open Science course.
After you've create your new repository from the template, build your site by following along with the Material for MkDocs documentation. After you have made at least one commit, go to your repository settings and set the GitHub Pages branch setting to gh-pages
to make your pages live:
A collection of best practices and examples from industry-leading documentation.
The Diataxis Framework provides a systematic approach to documentation, dividing it into four distinct types:
Example: Writing your first Django app
What makes it great:
Example: Django's Remote User Authentication
What makes it great:
Example: FastAPI's Path Parameters
What makes it great:
Example: Django's Database Transactions
What makes it great:
Documentation-Driven Development (DDD) is an approach where documentation is written before implementing features.
GitHub co-founder Tom Preston-Werner wrote about "Readme Driven Development" in 2010 which is probably where the practice stems from.
Example: We can see elements of upfront API design in FastAPI's approach. FastAPI encourages developers to define their API schema first through Python type hints and docstrings, which then automatically generate both documentation and data validation:
from fastapi import FastAPI
app = FastAPI()
@app.get("/items/{item_id}")
async def read_item(item_id: int, q: str | None = None):
"""
Retrieve an item by its ID.
- **item_id**: The unique identifier of the item
- **q**: Optional query string for searching
Returns the item details or a 404 error if not found.
"""
return {"item_id": item_id, "q": q}
This approach ensures that:
Example: Django's Documentation Process
Implementation features:
/docs
)Example: DigitalOcean's How-To Tutorial Format
Key elements:
# Example command with output
sudo snap install core; sudo snap refresh core
# Expected output
core 16-2.58.2 from Canonical✓ refreshed
Example: React's Tic-Tac-Toe Tutorial
React's documentation demonstrates true in-page interactivity:
This interactivity helps readers learn by doing and experiment safely.
Feel free to submit issues and enhancement requests!