PHPackages                             gentle/carta - 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. gentle/carta

ArchivedLibrary

gentle/carta
============

Simple way to transform different markup languages to HTML.

16PHP

Since Jul 20Pushed 11y ago1 watchersCompare

[ Source](https://github.com/gentlero/carta)[ Packagist](https://packagist.org/packages/gentle/carta)[ RSS](/packages/gentle-carta/feed)WikiDiscussions develop Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Carta library [![Build Status](https://camo.githubusercontent.com/6ef3b0dec03f356ce31f62b2f25f31c8ce78ff17dd63bd447ea9403e119f53b1/68747470733a2f2f7472617669732d63692e6f72672f67656e746c65726f2f63617274612e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/gentlero/carta) [![Coverage Status](https://camo.githubusercontent.com/f1e713f2b6d893596a94920d47cfe9743ee2c5fad172aa00549c5ec89fd1a505/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f67656e746c65726f2f63617274612f62616467652e706e673f6272616e63683d646576656c6f70)](https://coveralls.io/r/gentlero/carta?branch=develop)
==============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#carta-library--)

Carta offers a simple way to transform different markup languages to HTML (*the irony*). For the moment it supports Markdown and reStructuredText.

Example
-------

[](#example)

```
$carta = new \Gentle\Carta\Carta(
    '/path/to/markdown/files',
    new \Gentle\Carta\Parser\MarkdownParser()
);

# parse a single page and get content
$carta->page('subdir/file.md')->getContent();

# load all files from directory and get each page title
foreach ($carta->chapter('subdir/')->getPages() as $page) {
    echo $page->getMetaTag('title');
}
```

Page metadata
-------------

[](#page-metadata)

You can specify custom metadata inside each source file, by using the format `key: value` at the beginning of the file, surrounded by three or more dashes.

Example:

```
---
title: "The page title"
description: "Page description"
tags: ["tag1", "tag2"]
---
```

This will result in the following usage:

```
// [...]
$page->getMetaTag('title');        // will return: The page title
$page->getMetaTag('description');  // will return: Page description
$page->getMetaTag('tags');         // will return: array('tag1', 'tag2')
```

There are no restrictions in place for what meta keys you can use, so you can define any key you want.

Glossary
--------

[](#glossary)

The following terms are used inside Carta library:

- **Page**: refers to a single source file. ( *.md, .rst, etc* )
- **Chapter**: refers to a directory which contains multiple "*Pages*".

License
-------

[](#license)

`Carta` is licensed under the MIT License - see the LICENSE file for details

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d360d7a6070deb0054128aeabde12eb5fa070481eb42fd747f63c17ccb0b863?d=identicon)[vimishor](/maintainers/vimishor)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/gentle-carta/health.svg)

```
[![Health](https://phpackages.com/badges/gentle-carta/health.svg)](https://phpackages.com/packages/gentle-carta)
```

PHPackages © 2026

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