Markdown: Markdown Hands-On Project — Writing a README
No amount of theory beats writing a real document — today we'll create a complete open-source project README from scratch.
1. What You'll Learn
- Apply all Markdown syntax comprehensively
- Write a professional GitHub project README
- Organize open-source project documentation
- Write API documentation and contribution guides
- Best practices for project documentation
2. An Open-Source Founder's Real Story
(1) Pain Point: A messy README stifles project growth
Casey released an open-source CLI tool with great code quality, but the README had only three paragraphs and a single install command. A month after release, the project had just 50 stars, and Issues were flooded with "how do I use this?", "what does it do?", and "how do I contribute?"
(2) Solution: Rewrite the README with Markdown
Casey studied the READMEs of 10 high-star projects and rewrote the project readme with Markdown: added project badges, a feature list, demo screenshots, installation steps, API documentation, a contribution guide, and a license. After the rewrite, stars jumped from 50 to 800, and basic questions dropped by 70%.
3. README Standard Structure
A professional GitHub README typically includes these sections:
| Section | Purpose | Audience |
|---|---|---|
| Title + Badges | Quick project identification and status | All visitors |
| Project Description | 1-2 sentences on what the project does | First-time visitors |
| Features | List of core features | Potential users |
| Screenshots / Demo | Visual showcase | All visitors |
| Installation Guide | Quick setup | Users |
| Usage Examples | Common use cases | Users |
| API Docs | Detailed reference | Developers |
| Contribution Guide | How to participate | Contributors |
| License | Usage rights | All visitors |
4. Hands-On Project: Writing a Complete README
Below is the full README structure for a fictional open-source project QuickLog (a lightweight Python logging library).
(1) Project Name and Badges
Use H1 for the title and image syntax pointing to shields.io for badges:
Title: QuickLog
Badge line: Python Version · Build Status · License
Tagline: A lightweight, zero-config logging library for Python
Badges let visitors see the project's version, build status, and license at a glance.
(2) Features
Features section:
- Zero config: works out of the box, no configuration needed
- Structured logging: supports JSON format output
- Color output: color-coded by log level
- Lightweight: pure Python, zero external dependencies
(3) Installation and Quick Start
# Install
pip install quicklog
# Quick start
from quicklog import get_logger
logger = get_logger("my_app")
logger.info("Application started")
(4) API Documentation
get_logger(name, level=INFO, format="console")
Parameters:
| name | str | Logger name |
| level | int | Minimum log level |
| format | str | "console" or "json" |
(5) Contribution Guide
Contributing steps:
1. Fork the repository
2. Create a feature branch
3. Commit your code
4. Push to remote
5. Open a Pull Request
Pre-commit checklist:
- Code follows PEP 8
- Tests pass
- Documentation is updated
Syntax Recap: This README applies nearly every syntax from this tutorial — headings, text styling, links, images (badges), code (inline and fenced), tables, lists (ordered/unordered/task), blockquotes, horizontal rules, and emoji. Each section uses the most appropriate syntax for its purpose.
▶ Example: Anatomy of a complete README structure
Standard README structure:
Title + Badges (project name and status)
Project Description (one or two sentences on purpose)
Features (bullet list of highlights)
Installation Guide (code block with install commands)
Usage Examples (code block with basic usage)
API Reference (table with parameter descriptions)
Contribution Guide (ordered list of steps)
License (open-source license info)
5. Project Documentation Organization
A mature open-source project typically needs additional documentation files:
project-root/
README.md # Project homepage
CONTRIBUTING.md # Contribution guide
CHANGELOG.md # Version changelog
LICENSE # License
CODE_OF_CONDUCT.md # Code of conduct
docs/ # Detailed documentation
installation.md
getting-started.md
api-reference.md
troubleshooting.md
(1) CHANGELOG.md Example
Changelog includes version number, date, and change categories:
Version 2.0.0:
Added: JSON format output support, Async compatibility
Fixed: Color output on Windows, Memory leak fix
(2) CONTRIBUTING.md Example
Contributing doc includes:
1. Development environment setup
2. Test running commands
3. Code style guide
4. PR submission requirements
▶ Example: From README to full documentation site
Documentation roadmap:
1. Start with README.md covering core info
2. Add CONTRIBUTING.md and CHANGELOG.md as needed
3. Build the docs/ directory as the project matures
4. Deploy a documentation site with MkDocs or Hugo
▶ Example: Lint your docs automatically
# Check Markdown syntax formatting
markdownlint README.md
# Check for spelling errors
codespell README.md
# Check for broken links
lychee README.md
6. Documentation Quality Checklist
Go through each item after writing your docs:
| # | Check | Notes |
|---|---|---|
| 1 | Spell check | No typos or technical term misuse |
| 2 | Link validity | All links are accessible, no dead links |
| 3 | Code is runnable | Code examples in README actually run |
| 4 | Consistent formatting | Same content types use consistent formatting |
| 5 | Consistent terminology | Same concept uses the same term throughout |
| 6 | Screenshots updated | Screenshots match the latest version |
7. Course Summary
Congratulations on completing all 14 lessons of the Markdown tutorial! Here's the knowledge overview:
| Module | Lessons | Core Skills |
|---|---|---|
| Basic Syntax | Lessons 01-05 | Headings, text styling, lists, links, images |
| Intermediate Syntax | Lessons 06-10 | Code, tables, blockquotes, HTML mixing |
| Extended Features | Lessons 11-12 | GFM, emoji, task lists, strikethrough |
| Advanced Usage | Lesson 13 | Mermaid diagrams, math formulas, static sites |
| Hands-On Practice | Lesson 14 | README writing, project documentation organization |
From today onward, you can write technical documentation, project READMEs, blog posts, and study notes in Markdown — this skill will accompany you throughout your entire tech career.
❓ FAQ
📖 Summary
- A good README includes: Title / Badges, Description, Features, Screenshots, Installation, Usage, API, Contributing, License
- Combining multiple Markdown syntaxes makes documentation professional and readable
- Open-source projects also need CHANGELOG.md, CONTRIBUTING.md, and other supporting docs
- Documentation quality requires regular checks: link validity, code runnability, screenshot freshness
- Markdown documents should be under Git version control
- These 14 lessons cover Markdown from fundamentals to real-world application
📝 Exercises
-
Beginner: Pick an open-source project you're familiar with (or your own project) and write a README from scratch in Markdown. Include at minimum: project description, feature list, install commands, and usage examples.
-
Intermediate: Add CONTRIBUTING.md and CHANGELOG.md to your project. The CHANGELOG should cover at least 2 version entries.
-
Challenge: Create a complete project documentation site (use GitHub Pages + Jekyll, or Hugo) and deploy your Markdown documents online. The site should have at least 3 pages: README/homepage, Quick Start, and API Reference.