A markdown-based single-page documentation website with automatic table of contents generation, responsive sidebar navigation, and GitHub Pages deployment.
- 📝 Markdown Source - Write content in simple markdown format
- 📱 Responsive Design - Sidebar navigation on desktop, burger menu on mobile
- 📑 Auto TOC - Automatically generates table of contents from headers
- ⚡ Fast Loading - Lightweight with cache busting for CSS
- 🚀 GitHub Pages - Automated deployment with GitHub Actions
- ✨ Smooth Navigation - Smooth scrolling to sections
-
Clone this repository:
git clone https://github.com/SteffenBlake/Dichotomy.git cd Dichotomy -
Install Python dependencies:
pip install -r requirements.txt
-
Build the HTML from markdown:
python build.py
-
Open
index.htmlin your web browser or serve locally:python -m http.server 8000
The repository includes a GitHub Actions workflow that automatically builds and deploys your site when you push to the main branch.
Setup Steps:
- Go to your repository on GitHub
- Navigate to Settings → Pages
- Under "Build and deployment" → "Source", select GitHub Actions
- Push changes to the
mainbranch, and the workflow will automatically:- Build the HTML from
content.md - Apply cache busting to CSS
- Deploy to GitHub Pages
- Build the HTML from
- Your site will be published at
https://dichotomy.technically.fun
Edit content.md to customize your documentation:
- Use
#for top-level sections - Use
##for subsections - Use
###for sub-subsections - The table of contents will be automatically generated from these headers
Example:
# Getting Started
This is the intro to the getting started section.
## Installation
Instructions for installation.
### Prerequisites
What you need before installing.Edit styles.css to customize:
- Color scheme (sidebar, links, etc.)
- Typography and fonts
- Layout and spacing
- Responsive breakpoints
After making changes to content.md or styles.css, rebuild the site:
python build.pyDichotomy/
├── content.md # Markdown source file
├── build.py # Build script to generate HTML
├── index.html # Generated HTML file (auto-generated)
├── styles.css # CSS stylesheet
├── requirements.txt # Python dependencies
├── .github/
│ └── workflows/
│ └── deploy.yml # GitHub Actions workflow
└── README.md # This file
- Content: Write your documentation in
content.mdusing standard markdown - Build: Run
build.pyto convert markdown to HTML with automatic TOC generation - Deploy: GitHub Actions automatically builds and deploys on push to main
- Cache Busting: CSS files get a unique hash to prevent caching issues
This template works on all modern browsers:
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
Feel free to use this template for your projects.
Contributions are welcome! Feel free to open issues or submit pull requests.