ohseesoftware/laravel-markdown-content

Laravel Markdown Content is an opinionated package that aims to make adding markdown generated pages to your site a breeze.

v1.1.0 2022-01-30 18:25 UTC

This package is auto-updated.

Last update: 2024-10-29 06:13:10 UTC


README

Current Release Build Status Badge Downloads MIT License

Overview

Laravel Markdown Content is an opinionated package that aims to make adding markdown generated pages to your site a breeze. It follows the same idea and was heavily inspired by Laravel Pages.

Out of the box, Laravel Markdown Content supports the following use cases:

  • Rendering a single article
  • Rendering a list of articles
  • Rendering a single category

Articles can be any type of content and are not limited to "posts".

Content

  • Markdown content is parsed and rendered into HTML via Commonmark, allowing you to pass in extra plugins
  • The package will then render a Blade view of your choosing, passing in the HTML version of the markdown content

Installation

Install the package via composer:

composer require ohseesoftware/laravel-markdown-content

Publish the configuration file:

php artisan vendor:publish --tag=markdown-content-config

The configuration file allows you to define:

  • Custom Commonmark extensions for rendering your content
  • Route definitions for the supplied route logic

Note: the package does not provide a default view to render your content, so you must supply your own view and add it to the configuration file.

Maintainability score

  • If you want to report on code maintainability, setup the repo at https://codeclimate.com
  • Update the Code Climate image URL in this README file

Write documentation

  • Remove this TODO section and replace with documentation for your package!

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email security@ohseesoftware.com instead of using the issue tracker.

Credits

License

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

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.