-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the complete documentation for readme-peacock – a Python CLI that instantly turns your README.md into a stunning landing page.
- Installation
- Basic Usage
- Command-Line Options
- Processing Multiple Markdown Files
- Themes & Appearance
- Output Naming
- GitHub Quick-Link Buttons
- GitHub Action Integration
- Real-World Examples
- Contributing & Development
- Frequently Asked Questions
readme-peacock is published on PyPI. You need Python 3.8 or higher.
-
(Optional but recommended) Create and activate a virtual environment: python -m venv venv On Windows: venv\Scripts\activate On macOS/Linux: source venv/bin/activate
-
Install the package: pip install readme-peacock
After installation, the command peacock is available in your terminal.
Navigate to any folder that contains a README.md and run:
peacock
This will create a site/ folder containing an index.html file. Open that file in a browser to see your landing page.
| Option | Description |
|---|---|
input |
Path to the Markdown file (default: README.md) |
-o, --output |
Output HTML file path (default: site/index.html) |
--repo |
GitHub repository in user/repo format – adds quick-link buttons |
--template |
Choose a theme: glass (default) or dark
|
--all |
Process all .md files in the current directory (or a given folder) |
--help |
Show the help message |
--version |
Display the tool version |
Example:
peacock README.md -o landing.html --repo "ZvanTors/readme-peacock"
Use the --all flag to convert every .md file in a directory at once:
peacock --all
-
README.mdbecomesindex.html - Other files (e.g.
faq.md) keep their base name (faq.html)
All outputs are placed inside the site/ folder (or the directory you specify with -o).
Combine --all with other options:
peacock --all --template dark --repo "ZvanTors/readme-peacock"
Two built-in themes are available through the --template option:
- glass (default): A glassmorphism design that automatically switches between light and dark mode based on your OS settings.
- dark: An always-dark theme with a black background and orange accents for buttons and links.
Each theme’s CSS variables are defined inside peacock.py. You can customize them by editing the source.
-
Single-file mode: The output path is exactly what you pass with
-o. If the parent directory does not exist, it will be created automatically. -
Multi-file mode (
--all): The value given to-o(defaultsite) is treated as a directory. Inside it:- A file whose stem is
readme(case-insensitive) becomesindex.html. - Every other file keeps its original name with a
.htmlextension (e.g.contributing.md→contributing.html).
- A file whose stem is
When you provide --repo "user/repo", five static buttons are added to the hero section:
- Issues
- Pull Requests
- Releases
- Wiki
- Star (links to the repository home)
These buttons are pure HTML – they work even if you open the file locally, no JavaScript API calls required.
You can use readme-peacock as a GitHub Action to automatically build and deploy your landing page on every push.
- In your repository, create a file at
.github/workflows/peacock.yml. - Add the following content (note the use of
ZvanTors/readme-peacock@v1):
name: Generate Landing Page on: push: branches: [main] workflow_dispatch:
permissions: contents: read pages: write id-token: write
concurrency: group: "pages" cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
environment:
name: github-pages
url:
- Go to Settings → Pages, and set the source to GitHub Actions.
- After your next push to
main, the landing page will be live athttps://USERNAME.github.io/REPO.
This Action is also listed on the GitHub Marketplace.
-
This project’s own landing page
TheREADME.mdyou are reading was converted byreadme-peacockand deployed via GitHub Pages:
https://zvanTors.github.io/readme-peacock -
Dark theme preview
Run the following to see the dark theme output locally: peacock --template dark -o dark-demo.html
Contributions are welcome! To get started:
- Fork the repository.
- Create a feature branch: git checkout -b feature/amazing-idea
- Make your changes and commit them: git commit -m "Add amazing idea"
- Push to your fork and open a Pull Request.
The source code lives in peacock.py (the only dependency is the markdown library).
Please test your changes with a sample README before submitting.
1. Why are my images not showing in the output?
If your README references local images (e.g. screenshot.png), you need to copy those files next to the generated HTML file. The tool does not automatically copy assets.
2. Can I use my own custom CSS?
Currently you can manually edit the generated HTML. In future versions we plan to support a --css custom.css option.
3. Can I deploy the output to Vercel or Netlify?
Absolutely. The output is a static HTML file and works on any static hosting service.
We hope you enjoy using readme-peacock! 🦚