Download the PHP package keyboardcowboy/topdown without Composer

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

TopDown

Generate a Table of Contents for your markdown files.

https://github.com/KeyboardCowboy/TopDown

This was inspired by the GitHub wiki. Its usefulness is trumped by the the fact that the sidebar is in no way connected to the wiki pages. You can break a link by changing a page name. With TopDown you can generate a simple Table of Contents, for example the _Sidebar.md file in GitHub, just by using a simple naming convention.

How it Works

  1. Install this library.
  2. Create a PHP file and include TopDown.php.
  3. Tell TopDown where the files live and the name of the TOC file to create.

    $sidebar = new TopDown('/path/to/files');
    $sidebar->create('TableOfContents.md');

This will create the file /path/to/files/TableOfContents.md

With GitHub

GitHub wikis are their own repos. Check yours out to your local machine instead of editing the files in the UI. When you are done creating or editing your files, run TopDown and your sidebar is ready to go!

There is a subclass to make generating GitHub Wiki sidebars super simple.

  1. Check out your wiki repo and cd into it.
  2. Run composer require keyboardcowboy/topdown
  3. Add a php file, for example buildSidebar.php to the repo then copy and paste this snippet:

    <?php
    require_once 'vendor/keyboardcowboy/topdown/TopDown.php';
    
    $sidebar = new GitHubWikiSidebar();
    $sidebar->create();

Now, simply run php buildSidebar.php! That’s it!

File Names

TopDown relies on a simple naming convention to generate the hierarchy. By default a double-hyphen is used as the hierarchical separator, but you can tell TopDown to use any string as the separator. For example:

contributing.md
contributing--configuration.md
contributing--configuration--advanced.md
contributing--configuration--beginner.md
contributing--getting-started.md
contributing--giving-back.md
more.md

Would generate a table of contents like this:

TopDown reads the files out of the given directory top down, which is generally alphabetically, so to rearrange items simply prefix them with a number.

contributing.md
contributing--1-getting-started.md
contributing--2-configuration.md
contributing--2-configuration--1-beginner.md
contributing--2-configuration--2-advanced.md
contributing--3-giving-back.md
more.md

File names that begin with a number then a period or hyphen will have that part trimmed off to generate the link name.

Options

TopDown::title string : Set a custom title for the file. Defaults to ‘Table of Contents’

TopDown::separator string : Set a custom separator to determine hierarchy. Defaults to --.

TopDown::format int : Set the list format. Defaults to TopDown::UNORDERED.

TopDown::fileExt bool : Whether or not to build the links with the file extension. GitHub does not use the .md file extensions on its wiki page urls.

TopDown::ignore array : An array of filenames to ignore.

TopDown::footer string : A custom file to use to generate the footer below the table of contents. Use FALSE to disable the footer content.


All versions of topdown with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.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 keyboardcowboy/topdown contains the following files

Loading the files please wait ....