vtalbot/markdown
Larablocks Analysis
vtalbot/markdown works with Laravel 5 to 8 (latest release 3.0.0, Mar 1, 2021), all past end of life (the last on Jan 24, 2023): no more fixes, even for security.
Laravel 4 in earlier releases.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 5 to 8, past end of life since Jan 24, 2023
- No release in the last 12 months (last: Mar 1, 2021)
- 950 downloads a month (needs 10,000)
- 97 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Mar 1, 2021.
- No releases in the last 12 months.
- First released: Jan 22, 2013.
- Monthly downloads: 950, down 94% from six months ago.
- 5 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 4, 2026.
| Install | |
|---|---|
composer require vtalbot/markdown |
|
| Latest Version: | 3.0.0 |
| Laravel: | 5 – 8 |
| Older releases: | 4 |
| License: | MIT |
| Last Updated: | Sep 13, 2022 |
| Links: | GitHub · Packagist |
Markdown Compiler for Laravel
Installation
For Laravel 4
- Run
composer require vtalbot/markdown:1.5 - Run
php artisan config:publish vtalbot/markdown - Then edit
config.phpinapp/config/packages/vtalbot/markdownto your needs. - Add
'VTalbot\Markdown\MarkdownServiceProvider',toprovidersinapp/config/app.phpand'Markdown' => 'VTalbot\Markdown\Facades\Markdown',toaliasesinapp/config/app.php
For Laravel 5+
- Run
composer require vtalbot/markdown:2.0 - Run
php artisan vendor:publish --provider=“VTalbot\Markdown\MarkdownServiceProvider” - Then edit
markdown.phpin yourconfigdirectory to your needs. - Add
VTalbot\Markdown\MarkdownServiceProvider::classtoprovidersinconfig/app.phpand'Markdown' => VTalbot\Markdown\Facades\Markdown::classtoaliasesinconfig/app.php
Usage
http://domain.name/test.md
If test.md doesn't exists in the public directory, it will search for test.md in app/markdown directory.
If found, compile it if needed and return the result.
Markdown::make('file-in-markdown-directory');
Or, you can compile a simple string:
Markdown::string('#test');
To handle markdown file not found:
Markdown::setNotFoundHandler(function($file) { return 'Markdown file not found'; });
Markdown::setNotFoundHandler('MarkdownController@missing');
Configuration
| Key | Default value | Description |
|---|---|---|
paths |
array('/markdown') |
Directory where to find the markdown files. |
routes |
array('',) |
Routes prefixes. |
extensions |
array('markdown','md') |
Extensions used to set routes. |
add_routes |
true |
Enable the creation of routes. |
empty_element_suffix |
' />' |
Suffix for empty element (br, hr). |
tab_width |
4 |
Tab character width. |
no_markup |
false |
Prevent HTML tags to be passed to output. |
no_entities |
false |
Convert entities like < to &. |
predef_urls |
array() |
Add reference for urls. array('ref' => '//goo.gl'): [google][ref] |
predef_titles |
array() |
Same as predef_urls. |
use_extra |
true |
Use Markdown with extra, eg.: fenced code block. |
fn_id_prefix |
'' |
Prefix for ID attributes generated by footnotes. |
fn_link_title |
'' |
Title for footnotes links. |
fn_backlink_title |
'' |
Same as fn_link_title. |
fn_link_class |
'footnote-ref' |
CSS class for footnotes links and backlinks. |
fn_backlink_class |
'footnote-backref' |
Same as fn_link_class. |
code_class_prefix |
'' |
Prepend CSS class to fenced code block. |
code_attr_on_pre |
false |
Put attributes on pre instead of code. |
predef_abbr |
array() |
Create predefine abbreviations. |
For more information on the Markdown configuration, you may refer to http://michelf.ca/projects/php-markdown/configuration .
Changelog
2.0
- Add support for Laravel 5
1.5
- Change deprecated dependency.
- Add Markdown file not found handler.
- Add configurations based on the new dependency.
- Add some tests.
Related Packages
A simple database logger for all outgoing emails sent by Laravel website.
A database logger for all outgoing emails sent by your Laravel application.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 3.0.0 | ^5|| | MIT | ||
| 2.0.1 | ~5.0 | MIT | ||
| 2.0 | ~5.0 | MIT | ||
| 1.5.1 | ~4 | MIT | ||
| 1.5 | ~4 | MIT | ||
| 1.4.2 | 4.x | MIT | ||
| 1.4.1 | >=4.0 | MIT | ||
| 1.4 | >=4.0 | MIT | ||
| 1.3 | >=5.3.0 | >=4.0 | MIT | |
| 1.2 | >=5.3.0 | >=4.0 | MIT | |
| 1.1 | >=5.3.0 | >=4.0 | MIT |