A beautiful, modern markdown-to-HTML renderer with advanced features including dark/light themes, responsive design, and table of contents navigation.
- ๐ฑ Responsive Design: Works perfectly on desktop, tablet, and mobile devices
- ๐ Dark/Light Theme: Automatic theme detection with manual toggle support
- ๐ Table of Contents: Auto-generated navigation sidebar with smooth scrolling
- ๐จ Modern UI: Clean, professional design with smooth animations
- โก Fast Loading: Optimized for performance with minimal dependencies
- ๐ URL Support: Load any markdown file via URL parameter
- โฟ Accessible: Built with accessibility in mind
- ๐ GitHub Flavored Markdown: Full GFM support including tables, code blocks, and more
Visit the live demo at: https://nguyenhhoa03.github.io/md2web/index.html
Simply visit the website to view the default markdown document.
Add a url parameter to load your own markdown file:
https://nguyenhhoa03.github.io/md2web/index.html?url=https://raw.githubusercontent.com/yourusername/yourrepo/main/README.md
# Load a GitHub README
https://nguyenhhoa03.github.io/md2web/index.html?url=https://raw.githubusercontent.com/microsoft/vscode/main/README.md
# Load any public markdown file
https://nguyenhhoa03.github.io/md2web/index.html?url=https://example.com/documentation.md- Download the
md2web-en-v?.htmlfile - Change
https://raw.githubusercontent.com/nguyenhhoa03/md2web/refs/heads/main/website.mdto your markdown url. - Upload to your web hosting service
- Access via your domain
git clone https://github.com/nguyenhhoa03/marksite
cd marksite
# Upload index.html to your hosting serviceYou can host md2web by Flask,...
The application automatically detects the best configuration, but you can customize:
Edit in index.html:
https://raw.githubusercontent.com/nguyenhhoa03/md2web/refs/heads/main/website.mdThe app automatically detects system theme preference. Users can toggle manually using:
- Click the theme button (๐/โ๏ธ)
- Keyboard shortcut:
Ctrl/Cmd + Shift + D
The TOC is automatically generated based on heading structure:
- Multiple H1 tags โ Uses H1 for navigation
- Single H1 + H2 tags โ Uses H2 for navigation
- No H2 tags โ Falls back to H3 or H4
Modify the CSS variables in the :root selector to customize colors:
:root {
--bg-primary: #ffffff;
--text-primary: #24292f;
--text-accent: #0969da;
/* ... more variables */
}Add your custom CSS after the existing styles in the <style> section.
- Marked.js: Markdown parsing (loaded from CDN)
- No other external dependencies
- โ Chrome 60+
- โ Firefox 60+
- โ Safari 12+
- โ Edge 79+
- โ Mobile browsers
- Lazy loading for large documents
- Smooth scrolling with intersection observer
- Optimized CSS animations
- Minimal JavaScript footprint
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Make your changes to
index.html - Test locally
- Submit a pull request
- Follow existing code style
- Test on multiple browsers
- Ensure responsive design works
- Update documentation if needed
This project is licensed under the GNU General Public License v3.0 - see the LICENSE section below for details.
- No user data is stored
- All markdown processing happens client-side
- CORS-enabled for loading external markdown files
- No server-side processing required
| Version | Release Date | Key Features |
|---|---|---|
| v1.3 | IDK | Add code copy button |
| v1.2 | IDK | ๐ URL parameter support, Mobile improvements |
| v1.1 | IDK | ๐ Auto table of contents |
| v1.0 | IDK | ๐ Basic markdown viewing, ๐ Theme support |
If you encounter any issues or have questions:
- Check the browser console for errors
- Ensure the markdown URL is publicly accessible
- Verify CORS headers are set correctly on the markdown source
- Try with different markdown files to isolate the issue
MarkSite works with any static hosting service:
- GitHub Pages: Free hosting for GitHub repositories
- Infinityfree: Free hosting I use for this project
- Vercel: Fast global CDN
- Any static hosting: Upload
index.htmland go!
MarkSite supports all GitHub Flavored Markdown features:
- โ Headers (H1-H6)
- โ Bold and italic text
- โ Links and images
- โ Code blocks with syntax highlighting
- โ Tables
- โ Blockquotes
- โ Lists (ordered and unordered)
- โ Horizontal rules
- โ Strikethrough text
- โ Task lists
- โ Emoji support
- PDF export functionality
- Print-optimized styles
- Search functionality
- Multiple theme options
- Offline support with service worker
- Custom CSS injection via URL parameters
Made with โค๏ธ for the markdown community
Host your markdown files beautifully with MarkSite!