Download the PHP package calebporzio/gitdown without Composer

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

GitDown

A simple package for parsing (GitHub Flavored) Markdown in PHP.

WARNING

This package is a fraud. All it does is fire off your markdown to a public GitHub API that returns the parsed result.

Knowing this, if you don't store the result, or take advantage of the provided caching features, you'll end up with slow page loads, or worse, rate-limit errors from GitHub.

Markdown parsing is super annoying, and this tradeoff is well worth it to me, I hope you embrace it as well.

Installation

TLDR;

Optionally, add the @gitdown snippet to your template's <head> section, and a .markdown-body class to a wrapper element, for GitHub markdown/code-syntax styling.

Authenticating With GitHub

Without authentication, GitHub will limit your API calls to 60 calls/hour. If you use authentication tokens, you can increase this limit to 5000 calls/minute. It is highly recommended that you use a "Personal Access Token" with this package. To obtain one, click here. (You can leave the permissions blank for this token.)

First, publish the package's config file.

php artisan vendor:publish --provider="GitDown\GitDownServiceProvider"

Then, add the following entry to your .env file.

Usage

Allowing Dangerous Tags

By default, GitHub sanitizes HTML tags it deems "unsafe" like <iframe>s. However, it's common to embed video or audio into your markdown with <iframe>s.

GitDown can intelligently preserve your tags by filling the allowedTags config array option in config/gitdown.php with the tags you want to prevent being parsed.

Non-Laravel Usage

You can set a GitHub Personal Access Token by passing it into the GitDown's constructor. new GitDown\GitDown($token)

Markdown/Syntax CSS

Styling markdown with CSS has always been a bit of a pain for me. Not to mention trying to style syntax inside code blocks. Not to worry!

GitDown ships with all the CSS you need to make your markdown look exactly like it does on GitHub. Just add this code somewhere on your HTML page, preferably near your other stylesheets in the <head> section.

Non-Laravel

Bam! That's all you need to make everything look good 🤙.

If echoing out CSS directly on your page doesn't sit well with you, you can add the styles to your stylesheet yourself using NPM.

npm install primer-markdown github-syntax-light --save

Now you can include the SCSS files in your Sass bundler:

GitHub Flavored Markdown

To enable GFM parsing for GitDown, set the "context" entry in config/gitdown.php to a repository name.

Enjoy!

Hope this makes your life easier. If it does, show the project some love on Twitter and tag me: @calebporzio


All versions of gitdown with dependencies

PHP Build Version
Package Version
Requires kitetail/zttp Version ^0.4.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 calebporzio/gitdown contains the following files

Loading the files please wait ....