marvinosswald/tailmark

Markdown renderer for Tailwind based on Commonmark

dev-main 2023-07-03 21:22 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package aims to convert markdown generated content to tailwind compatible html.

Installation

You can install the package via composer:

composer require marvinosswald/tailmark

You need to include this line in your content array in your tailwind.config.js.

    "./vendor/marvinosswald/tailmark/src/Renderer/**/*.php"

You can publish the config file with:

php artisan vendor:publish --tag="tailmark-config"

This is the contents of the published config file:

return [
    'h' => [
        1 => "text-extrabold text-3xl"
        ...
    ]
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="tailmark-views"

Usage

<x-tailmark-render :markdown="'# Headline'"></x-tailmark-render>

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.