Download the PHP package ernestdefoe/gh-readme without Composer

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

GitHub README Paste — Flarum 2 extension

Floxum Version Downloads Review License

Paste a GitHub repo URL into the Flarum composer and the URL is auto-replaced with the rendered README markdown.

How it works

  1. User pastes https://github.com/owner/repo into any composer (new discussion, reply, edit, private message).
  2. The frontend recognizes it as a GitHub repo root URL and intercepts the paste.
  3. It calls POST /api/gh-readme/fetch on the Flarum backend.
  4. The backend fetches https://api.github.com/repos/{owner}/{repo}/readme, decodes the base64 payload, rewrites relative image / link / anchor URLs against the repo's HEAD branch on raw.githubusercontent.com, and returns the processed markdown.
  5. The frontend replaces the URL in the composer with the README markdown. The user can edit freely from there.

Subsequent pastes of the same repo are served from a 10-minute server-side cache so a popular forum doesn't burn GitHub's rate limit.

Works with both composer types

Composer Behavior
Default Flarum (textarea + flarum/markdown) URL replaced inline by the markdown source. The post renders as formatted markdown at display time. A visible italic "Loading…" marker shows in the textarea during the fetch.
fof/rich-text (Tiptap WYSIWYG) URL replaced by rich nodes — headings, paragraphs, lists, code blocks, blockquotes, images all appear formatted in the composer immediately. A toast notification shows during the fetch (no inline marker — finding a specific text node inside a ProseMirror document is brittle).

Detection is automatic via the presence of editor.editor on the active driver. No setting needed.

Install

Then enable in Admin → Extensions → GitHub README Paste.

flarum/markdown is a suggest dep — without it the inserted markdown ends up in the post but renders as plain text rather than formatted headings/lists/code blocks.

Configure

Admin → Extensions → GitHub README Paste:

URL shapes accepted

URL Behavior
https://github.com/owner/repo ✅ expanded
https://github.com/owner/repo/ ✅ expanded
https://github.com/owner/repo.git ✅ expanded (strips .git)
https://www.github.com/owner/repo ✅ expanded
https://github.com/owner/repo/tree/main ❌ left as-is (use the root URL)
https://github.com/owner/repo/blob/main/file.md ❌ left as-is (file links, not repos)
http://github.com/owner/repo ❌ rejected (must be https)
https://gitlab.com/owner/repo ❌ not GitHub

Security notes

Support

Questions, bug reports, and feature requests:

License

MIT — see LICENSE.


All versions of gh-readme with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
flarum/core Version ^2.0
guzzlehttp/guzzle Version ^7.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 ernestdefoe/gh-readme contains the following files

Loading the files please wait ...