Download the PHP package ashtaev/toc without Composer

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

PHP Table of Contents

Latest Stable Version Total Downloads Latest Unstable Version License

A lightweight PHP library, for generating table of contents in the style of Wikipedia. It automatically generates table of contents for your posts, pages and custom post types by parsing its contents for headers. By doing so, you can let your readers jump to a corresponding header by clicking on a link in the TOC. You can place this TOC anywhere in a post using the shortcodes. You don’t have to add any links or create any anchors for this. Built Wikipedia in mind, the table of contents by default appears before the first heading on a page. You also get various methods to configure your TOC and control how it is going to appear. Also, it sets no limit to the number of TOC you can create. You can go on and have as many TOC as you want.

Screenshots

They're rendered using the sample templates provided in the templates directory, which depend on Bootstrap 4. You can easily use your own custom HTML to render the table of contents instead.

Default template:


Installation

Install with composer:

composer require ashtaev/toc

Basic usage

Here's a quick example using the defaults:

<html>
    <head>
        <!-- The default, built-in template supports the Bootstrap 4 TOC styles. -->
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
        <link rel="stylesheet" href="css/toc.css">
    </head>
    <body>

    <h1>Lorem ipsum</h1>

    </body>
</html>

This will output the following:

<p>Lorem ipsum... </p>

<div class="border d-inline-block pr-4 pt-3 bg-light toc">
    <div class="ml-4 mb-2"><b>Content</b></div>
    <ol>
        <li><a href="#Lorem_ipsum" title="Lorem ipsum">Lorem ipsum</a></li>
        <li><a href="#Expedita_sint" title="Expedita sint">Expedita sint</a></li>
        <li><a href="#Maiores_quas" title="Maiores quas">Maiores quas</a>
            <ol>
                <li><a href="#Delectus_laudantium" title="Delectus laudantium">Delectus laudantium</a></li>
                <li><a href="#Eaque_quisquam?" title="Eaque quisquam?">Eaque quisquam?</a></li>
                <li><a href="#Deleniti_et" title="Deleniti et">Deleniti et</a>
                    <ol>
                        <li><a href="#Facilis_iusto!" title="Facilis iusto!">Facilis iusto!</a></li>
                        <li><a href="#Beatae_eveniet" title="Beatae eveniet">Beatae eveniet</a></li>
                    </ol>
                </li>
                <li><a href="#Beatae_fugit?" title="Beatae fugit?">Beatae fugit?</a></li>
            </ol>
        </li>
        <li><a href="#Fugit_in" title="Fugit in maxime">Fugit in maxime</a></li>
        <li><a href="#Odit_reprehenderit" title="Odit reprehenderit">Odit reprehenderit</a></li>
    </ol>
</div>

<h2><span id="Lorem_ipsum">"1. Lorem ipsum</span></h2>

<p>Lorem ipsum dolor...</p>

All versions of toc with dependencies

PHP Build Version
Package Version
No informations.
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 ashtaev/toc contains the following files

Loading the files please wait ....