Skip to main content

A Python package that converts Markdown to HTML using Tailwind CSS 4 for styling.

Project description

md2html-tailwind4

A Python package that converts Markdown to clean, styled HTML using Tailwind CSS 4 classes.

Designed for projects that render HTML inside a Tailwind-powered frontend (Django, FastAPI, static sites, etc.). No build step required — just pass in Markdown, get back ready-to-render HTML.

Features

  • Converts Markdown to HTML with full Tailwind CSS 4 class annotations
  • Responsive tables with overflow scrolling
  • Audio table support (3-column tables with media URLs become interactive audio players)
  • Automatically escapes Django template delimiters ({{ }}, {% %}) inside code blocks
  • External links get target="_blank" and rel="noopener noreferrer" automatically
  • Dark mode support via Tailwind's dark: variants
  • CLI tool included

Installation

pip install md2html-tailwind4

Usage

Python API

from md2html_tailwind4 import Converter

converter = Converter()
html = converter.convert_md_to_html("# Hello\n\nThis is **Markdown**.")
print(html)

Command Line

md2html input.md output.html

Requirements

  • Python >= 3.11

License

MIT — White Neuron Co., Ltd.

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

md2html_tailwind4-1.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

md2html_tailwind4-1.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file md2html_tailwind4-1.1.0.tar.gz.

File metadata

  • Download URL: md2html_tailwind4-1.1.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for md2html_tailwind4-1.1.0.tar.gz
Algorithm Hash digest
SHA256 25d142424dc140c09eaae37f7dab185468bd97930f89ac92558077e51edea6c3
MD5 f9b0d79adc02c776421658649ad4ddd4
BLAKE2b-256 a213621b910600e692a9621c7f83387bd62694e0462522adce17bee0469885d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for md2html_tailwind4-1.1.0.tar.gz:

Publisher: python-publish.yml on White-Neuron/md2html-tailwind4

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file md2html_tailwind4-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for md2html_tailwind4-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e54b9129f56fa24007c87224ffea6b4409429daa3ed3adcff82e78ffccd2da30
MD5 4f22077a17dab1ff97eaac0293a9a978
BLAKE2b-256 a4a3ce347da9591cbf958d0dc0927e26e425b3d73f0c2afcee2e3f0951b296b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for md2html_tailwind4-1.1.0-py3-none-any.whl:

Publisher: python-publish.yml on White-Neuron/md2html-tailwind4

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page