Download the PHP package aheenam/mozhi without Composer

On this page you can find all versions of the php package aheenam/mozhi. 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 mozhi

Do not use in production yet

Mozhi

The package provides a simple way to add a static files based CMS to your Laravel project. It uses Markdown files as the content provider and uses Laravel's Blade for templating.

Requirements

This package requires PHP 7.2 and a Laravel version >= 5.7.

Installation

You can install the package via composer:

Configuration

Mozhi comes with a set of configuration possibilities, so make sure to check the config file's content:

All the keys are commented well enough, so the usage should not be too tough. If there is something not that clear, feel free to post an issue.

As you see all the config variables can be set using the env file, but if you want, you can also publish them to change the values.

Usage

After the setup all of your routes will be caught by Mozhi and the package will try to find the appropriate content file for it.

Consider the config as above and then a call to /blog/awesome-blog. Now Mozhi will look for a file in storage/contents/blog/ that is named awesome-blog.md.

If it is found, it will render the specified template of the currenty theme and pass the content and the header of the markdown file.

The MarkDown files are parsed using Spatie's awesome package called YAML Front Matter before parsing the markdown, so you can (and should decorate) your markdown files.

So in your template file you can use the $content and the $meta variables. First is the html of the content file and $meta is an array of all header data specified in the Markdown file.

Note: If no template was specified it will fallback to the default_theme specified in the config.

Parsing Markdown

Mozhi uses the CommonMark implementation of The PHP League to parse Markdown to HTML. They offer a way to extend the specification. Mozhi uses the Table Extension by default, but you can manage all the extension by changing the markdown_extensions array in the config.

Changelog

Check CHANGELOG for the changelog

Testing

To run tests use

$ composer test

Contributing

Security

If you discover any security related issues, please email [email protected] or use the issue tracker of GitHub.

About

Aheenam is a small company from NRW, Germany creating custom digital solutions. Visit our website to find out more about us.

License

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


All versions of mozhi with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
spatie/yaml-front-matter Version ^2.0
illuminate/support Version ^5.7|^5.8
illuminate/routing Version ^5.7|^5.8
illuminate/http Version ^5.7|^5.8
league/commonmark Version ^0.16.0
webuni/commonmark-table-extension Version ^0.8.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 aheenam/mozhi contains the following files

Loading the files please wait ....