Convert Markdown files to index.html
Project description
md2indexhtml
md2indexhtml
is a Python package that converts Markdown files to HTML files as index.html.
Features
- Converts Markdown to HTML
- Supports custom templates and CSS
- Automatically generates a sidebar from headers
- Easy-to-use command line interface
Installation
Install the package using pip:
pip install md2indexhtml
Usage
This document provides instructions on how to use the md2indexhtml
package to convert Markdown files to HTML files.
Basic Usage
To convert a Markdown file to an HTML file using the default settings, run the following command:
md2indexhtml path/to/yourfile.md
Advanced Usage
You can customize the conversion by providing additional options:
output_dir
: Directory to save the output HTML file.template
: Path to the HTML template.css
: Path to a custom CSS file.title
: Title for the HTML document and navbar.
Example:
md2indexhtml path/to/yourfile.md path/to/output/dir --template path/to/template.html --css path/to/custom.css --title "My Documentation"
Themes
Default Theme
md2indexhtml README.md output --title "Default Theme"
GoDocs Theme
md2indexhtml README.md output --title "GoDocs Theme" --template godocs.html
DocBox Theme
md2indexhtml README.md output --title "DocBox Theme" --template docbox.html
Python API
You can also use the package programmatically in your Python code:
from md2indexhtml import convert_md_to_html
convert_md_to_html(
md_file_path="path/to/yourfile.md",
output_dir="path/to/output/dir",
template_path="path/to/template.html",
custom_css_path="path/to/custom.css",
title="My Documentation"
)
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue on GitHub.
License
This project is licensed under the MIT License.
Feel free to adjust any of the content to better suit your needs.
Project details
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
File details
Details for the file md2indexhtml-0.1.4.tar.gz
.
File metadata
- Download URL: md2indexhtml-0.1.4.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fefba3951e85a36449141fc49bb947fbc0a648f9656db816a9294621fa7ff3f |
|
MD5 | 4804132a58e573d72c7765fe9dcdd653 |
|
BLAKE2b-256 | 5995e6c5fcda32fb87bdf0b6e564002074f6f73049b3365f3bf94180eb6ab888 |
File details
Details for the file md2indexhtml-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: md2indexhtml-0.1.4-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 866b48dfcc8b6e3bc4ca86ccd4dd51228ef85aac08ea52e66770887a095d12a5 |
|
MD5 | 59012641200a74688c198cdb299b1ddb |
|
BLAKE2b-256 | de3d8d8534b492f095f5bef153e121fc38362fdda65b371049972d65f9635ea5 |