Download the PHP package laravelista/sherlock without Composer

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

Sherlock

Latest Stable Version Total Downloads License Build Status

forthebadge forthebadge

Sherlock is a PHP package that provides unique features for markdown.

It can create a Table of Content or retrieve a specific chapter.

Overview

I use this package on my website Laravelista to create table of content for my lessons, posts and packages. Also, I use it to provide free samples of my lessons.

Get the Table of Content

Given this markdown:

You can generate a table of content:

HTML Output:

Get a specific chapter

Given the same markdown as in the sample above we can fetch a specific chapter from our markdown documents by its name.

Markdown output:

Laravel usage inside views

If you are using Laravel, there is a convenient way of loading Sherlock in your views. At the top of your view file where you want to display the Table of Content add this code to inject Sherlock and deduct the content:

And then in the place where you want to display the actual Table of Content add this:

or to get a specific chapter use $sherlock->get(). Just remember that get() returns markdown, so be sure to parse the markdown to HTML.

Installation

From the command line:

API

deduct

Reads given markdown string and generates an index of the document (Library).

You can chain this method with other methods from the API, but this method must always be called first. Library can be retrieved if needed with getLibrary().

getToc

Returns the Table of Content in HTML format.

Example:

Given this markdown:

it returns this HTML output:

get

Returns markdown for specific chapter.

Example:

Given this markdown:

it returns this Markdown output:

getLibrary

It returns the index of the document (Library); which was deducted from the given markdown in deduct() method; as an array.

Example:

This is a sample of the Library you get:

With it you can do all sorts of things.


All versions of sherlock with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
tightenco/collect Version ^5.2
twig/twig Version ~1.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 laravelista/sherlock contains the following files

Loading the files please wait ....