Beautiful Markdown to HTML converter with comprehensive Odoo frontend styling
Project description
md2indexhtml
md2indexhtml is a powerful Python package that converts Markdown files to beautifully styled HTML pages specifically designed for Odoo modules. It uses comprehensive Odoo frontend styling classes from web.assets_frontend.min.css to create professional, responsive documentation that integrates seamlessly with Odoo's design system.
Transform Your Documentation
Create stunning, professional HTML documentation from Markdown with authentic Odoo styling
Simple command, beautiful results:
md2indexhtml README.md
Features
- Comprehensive Odoo Styling: Uses authentic Odoo frontend classes for consistent design
- Enhanced Premium Design: Modern typography (Inter font), soft shadows, and clean card layouts by default
- Semantic HTML5: Generates clean, accessible HTML with proper semantic structure
- Automatic Image Handling: Processes and copies images with responsive styling
- Custom Resource Injection: Easily inject custom CSS stylesheets and JavaScript files
- CLI Integration: Simple command-line interface with powerful options
- Responsive Design: Mobile-friendly layouts with Odoo's responsive classes
- Typography Excellence: Beautiful typography using Odoo's font system alongside Google's Inter font
- Card-Based Layouts: Automatic section organization into elegant card layouts with hover effects
- Table Enhancement: Professional table styling with striped rows and hover effects
Installation
Install the package using pip:
pip install md2indexhtml
Quick Start
Basic Usage
Convert your README.md to Odoo-styled HTML:
cd your_odoo_module
md2indexhtml README.md
This creates a beautifully styled static/description/index.html file perfect for the Odoo Apps Store.
Without Arguments
If you have a markdown file in your current directory:
md2indexhtml
It automatically finds and converts the first .md file found.
Advanced Usage
Custom Output Path
Specify where to save the HTML file:
md2indexhtml README.md --output /path/to/docs.html
# or use the short form
md2indexhtml README.md -o /path/to/docs.html
Custom Title
Set a custom title for your HTML document:
md2indexhtml README.md --title "Module Documentation"
Inject Custom Styles or Scripts
You can inject custom CSS or JavaScript files into the generated HTML. This is useful for adding google analytics, custom fonts, or specific styling tweaks.
Add Custom Stylesheet:
md2indexhtml README.md --stylesheet "https://fonts.googleapis.com/css?family=Open+Sans,custom.css"
Add Custom Script:
md2indexhtml README.md --script "https://example.com/analytics.js,custom_script.js"
Content Structure
Markdown Conversion
The package intelligently converts markdown elements:
# Headersbecome full-width sections with Odoo styling## Subheadersbecome card-based feature sections- Lists are styled with Odoo's list classes
- Code blocks get syntax highlighting and proper spacing
- Images are automatically made responsive and centered
- Tables receive full Odoo table styling
HTML Preservation
You can mix HTML directly in your markdown:
# My Module
<section class="py-5 bg-primary text-white text-center">
<h2>Custom HTML Section</h2>
<p>This will be preserved exactly as written</p>
</section>
Image Handling
The package automatically processes images:
# Using Markdown

# Using HTML
<img src="assets/demo.jpg" alt="Demo" />
Automatic Processing:
- Copies images to
images/directory in output location - Updates paths to use only filenames (flattens directory structure)
- Adds responsive classes automatically
- Preserves external URLs and base64 images
Python API
Use the package programmatically:
from md2indexhtml import convert_md_to_html
# Basic conversion
convert_md_to_html("README.md")
# With custom custom title and output
convert_md_to_html(
md_file_path="README.md",
title="My Documentation",
output_path="docs/index.html"
)
# With custom stylesheets and scripts
convert_md_to_html(
md_file_path="README.md",
stylesheets=["https://example.com/style.css", "custom.css"],
scripts=["https://example.com/script.js"]
)
Output Features
The generated HTML includes:
- Semantic Structure: Proper HTML5 semantic elements
- Responsive Design: Mobile-first responsive layout
- Odoo Integration: Native Odoo styling classes
- Typography: Professional typography with Odoo fonts
- Accessibility: ARIA labels and semantic markup
- Performance: Optimized CSS and clean HTML structure
Odoo Apps Store Ready
Files generated with md2indexhtml are specifically designed for the Odoo Apps Store:
- Uses
oe_structurecontainers for proper Odoo integration - Includes proper meta tags and viewport settings
- Follows Odoo's design guidelines and color schemes
- Optimized for the Apps Store's rendering system
CLI Reference
# Convert with defaults
md2indexhtml README.md
# Custom title and output
md2indexhtml README.md --title "My Module" --output custom.html
# Inject Custom resources
md2indexhtml README.md --stylesheet "style.css" --script "app.js"
# Get version
md2indexhtml --version
Contributing
Contributions are welcome! Please feel free to submit pull requests or open issues on GitHub.
Development Setup
git clone https://github.com/fasilwdr/md2indexhtml.git
cd md2indexhtml
pip install -e .
License
This project is licensed under the MIT License. See the LICENSE file for details.
Author
Fasil (@fasilwdr)
Email: fasilwdr@hotmail.com
GitHub: https://github.com/fasilwdr
Transform your Markdown documentation into professional, Odoo-ready HTML with md2indexhtml!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file md2indexhtml-0.6.0.tar.gz.
File metadata
- Download URL: md2indexhtml-0.6.0.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27d861333bbbb4957cf3ae312cbbb88546b4452775fc037bf1babbebfcb09b62
|
|
| MD5 |
cb3650919d4f281ca792704b73f23f12
|
|
| BLAKE2b-256 |
2abdbc3423ee62d94ea0e7e78cae7ef05fa2857735b71a969dece925f73ff7f9
|
Provenance
The following attestation bundles were made for md2indexhtml-0.6.0.tar.gz:
Publisher:
publish.yml on fasilwdr/md2indexhtml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
md2indexhtml-0.6.0.tar.gz -
Subject digest:
27d861333bbbb4957cf3ae312cbbb88546b4452775fc037bf1babbebfcb09b62 - Sigstore transparency entry: 752776083
- Sigstore integration time:
-
Permalink:
fasilwdr/md2indexhtml@112f9cfaba1afea3e0bd3711deb1de390d768f19 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/fasilwdr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@112f9cfaba1afea3e0bd3711deb1de390d768f19 -
Trigger Event:
release
-
Statement type:
File details
Details for the file md2indexhtml-0.6.0-py3-none-any.whl.
File metadata
- Download URL: md2indexhtml-0.6.0-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
951f75223f6f7ff5a5031f847dea8ed059e5e5ddd7789f1fb6062feb6ec1cde9
|
|
| MD5 |
f928bcdb6b50966f9525f501ff715d9d
|
|
| BLAKE2b-256 |
feefabd74e6c38ba9113cfc33fa0df17781d98452540f05f14ac236c24b6a605
|
Provenance
The following attestation bundles were made for md2indexhtml-0.6.0-py3-none-any.whl:
Publisher:
publish.yml on fasilwdr/md2indexhtml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
md2indexhtml-0.6.0-py3-none-any.whl -
Subject digest:
951f75223f6f7ff5a5031f847dea8ed059e5e5ddd7789f1fb6062feb6ec1cde9 - Sigstore transparency entry: 752776085
- Sigstore integration time:
-
Permalink:
fasilwdr/md2indexhtml@112f9cfaba1afea3e0bd3711deb1de390d768f19 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/fasilwdr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@112f9cfaba1afea3e0bd3711deb1de390d768f19 -
Trigger Event:
release
-
Statement type: