Download the PHP package cassarco/markdown-tools without Composer

On this page you can find all versions of the php package cassarco/markdown-tools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package markdown-tools

markdown-tools

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

A Laravel package for processing markdown files with validation and custom handlers.

Why?

Markdown files with YAML front-matter are a great way to manage content. They're version-controlled, portable, and easy to edit. But when your Laravel application needs that content in the database, you need a reliable way to import it.

This package lets you:

How it works

Define one or more schemes in your configuration file, then run the bundled command to process them.

Installation

Install the package via composer:

Run the install command to publish the config and action stubs:

This publishes:

Alternatively, publish them separately:

Configuration

The published config file defines your schemes:

Usage

Define Validation Rules

Edit app/Actions/MarkdownFileRules.php to specify validation rules for front-matter properties:

Define a Handler

Edit app/Actions/MarkdownFileHandler.php to process each markdown file:

Process Your Schemes

Run the bundled command:

If files fail validation, you'll see Laravel validation errors:

MarkdownFile Methods

The handler receives a MarkdownFile instance with these methods:

Real-World Example

Here's how I use this package to sync markdown files to my database:

Upgrading from v1 to v2

Version 2.0 introduces breaking changes to support config caching. Handlers and rules are now class-based instead of closures.

Step 1: Update your dependencies

This requires Laravel 11+ and PHP 8.3+.

Step 2: Publish the action stubs

This creates app/Actions/MarkdownFileHandler.php and app/Actions/MarkdownFileRules.php.

Step 3: Migrate your handler logic

Move your closure logic from the config file to the new handler class.

Before (v1):

After (v2):

Step 4: Migrate your validation rules

Move your rules array to the new rules class.

Before (v1):

After (v2):

Step 5: Update your config

Replace closures with class references:

Note: The default scheme was renamed from 'markdown' to 'default'.

Testing

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

If you find a bug that impacts the security of this package please send an email to [email protected] instead of using the issue tracker.

Credits

License

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


All versions of markdown-tools with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
cassarco/league-commonmark-wikilinks Version ^1.0.2
spatie/laravel-package-tools Version ^1.16
symfony/dom-crawler Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cassarco/markdown-tools contains the following files

Loading the files please wait ...