PHPackages                             abgeo/gen-md - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. abgeo/gen-md

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

abgeo/gen-md
============

Library for generating Markdown document

v0.9(6y ago)2901[1 PRs](https://github.com/ABGEO/gen-md/pulls)MITPHP

Since Aug 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ABGEO/gen-md)[ Packagist](https://packagist.org/packages/abgeo/gen-md)[ Docs](https://github.com/ABGEO07/gen-html)[ RSS](/packages/abgeo-gen-md/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

gen-md
======

[](#gen-md)

PHP Library for generating Markdown document

[![GitHub license](https://camo.githubusercontent.com/b5f1b27c873c29775095f93928521e84bba148ec026fe1af9ac44bc46bcd4321/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f414247454f30372f67656e2d6d642e737667)](https://github.com/ABGEO07/gen-md/blob/master/LICENSE)[![GitHub release](https://camo.githubusercontent.com/6e82387591114c19273d31a8c511198d59f10f495a160866a21c92c80fb2d1e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f414247454f30372f67656e2d6d642e737667)](https://github.com/ABGEO07/gen-md/releases)[![Packagist Version](https://camo.githubusercontent.com/745fc38feccd10a196c000b3523ea66c9da7878ad465a8dc8267f3c211433f51/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616267656f2f67656e2d6d642e737667 "Packagist Version")](https://packagist.org/packages/abgeo/gen-md "Packagist Version")

[![PHP Innovation Award August 2020 Winner](https://camo.githubusercontent.com/ac8cb1098f4a3d0c614368f6d847ea44e0f0a7acc4570e38a3f475ea52788d4d/68747470733a2f2f7777772e706870636c61737365732e6f72672f61776172642f696e6e6f766174696f6e2f77696e6e65722e706e67)](https://www.phpclasses.org/package/11759-PHP-Compose-and-generate-Markdown-documents.html)

---

Installation
------------

[](#installation)

You can install this library with [Composer](https://getcomposer.org/):

- `composer require abgeo/gen-md`

Usage
-----

[](#usage)

Include composer autoloader in your main file (Ex.: index.php)

- `require_once __DIR__ . '/../vendor/autoload.php';`

### Classes

[](#classes)

The library has two classes:

- `\ABGEO\MDGenerator\Document` - For generating Markdown Document;
- `\ABGEO\MDGenerator\Element` - For generating Markdown element;

#### Class `Document`

[](#class-document)

Import `ABGEO\MDGenerator\Document` class.

##### Public Methods

[](#public-methods)

- `addElement()` - Add element to Document content;
- `clear()` -Clear Document content;

**Note: See usage in [example.php](examples/example.php)**

#### Class `Element`

[](#class-element)

Import `ABGEO\MDGenerator\Element` class.

##### Public Methods

[](#public-methods-1)

- `concatenateElements()` - Concatenate given elements;
- `createHeading()` - Create heading element;
- `createParagraph()` - Create Paragraph element;
- `createBreak()` - Create Line Break element;
- `createBold()` - Create Bold element;
- `createItalic()` - Create Italic element;
- `createBoldAndItalic()` - Create Bold and Italic element;
- `createBlockquote()` - Create Blockquote element;
- `createList()` - Create List element;
- `createLine()` - Create Line element;
- `createLink()` - Create Link element;
- `createImage()` - Create Image element;

**Note: See usage in [example.php](examples/example.php)**

### Exporting

[](#exporting)

The `ABGEO\MDGenerator\Document` class has `export2File()` method that takes one argument

- File path for generated document.

### Example

[](#example)

```
...
// Export document to file.
$document->export2File(__DIR__ . '/generated/example.MD');
...
```

Examples
--------

[](#examples)

See full example in [example.php](examples/example.php).

Authors
-------

[](#authors)

- **Temuri Takalandze** - *Initial work* - [ABGEO](https://abgeo.dev)

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2449d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/003cac08dd47c34ad3a5ed454c2968ed6afea9e26d57033867d4166fa08b3555?d=identicon)[ABGEO](/maintainers/ABGEO)

---

Top Contributors

[![ABGEO](https://avatars.githubusercontent.com/u/19558543?v=4)](https://github.com/ABGEO "ABGEO (12 commits)")

---

Tags

phpgeneratormarkdownmd

### Embed Badge

![Health badge](/badges/abgeo-gen-md/health.svg)

```
[![Health](https://phpackages.com/badges/abgeo-gen-md/health.svg)](https://phpackages.com/packages/abgeo-gen-md)
```

###  Alternatives

[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

2.9k404.0M702](/packages/league-commonmark)[davidbadura/faker-markdown-generator

Faker Markdown Generator

18833.6k10](/packages/davidbadura-faker-markdown-generator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
