PHPackages                             ac/servedown - 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. ac/servedown

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

ac/servedown
============

A utility library to help serve directories of markdown content on the web.

0.9.1(13y ago)042MITPHPPHP &gt;5.3.3

Since Feb 13Pushed 13y ago5 watchersCompare

[ Source](https://github.com/AmericanCouncils/Servedown)[ Packagist](https://packagist.org/packages/ac/servedown)[ RSS](/packages/ac-servedown/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Servedown
=========

[](#servedown)

This is a simple little utility to aid in serving markdown content on the web. It provides code abstractions for directories of markdown files, each of which may optionally contain a *YAML* configuration header.

There are only three classes to be aware of: `Repository`, `Directory` and `File`. A `File` just encapsulates a file on disc, and allows you to interact with the data in the configuration header (if present) independently of the main content. The `Directory` acts as a configurable factory for `File` objects under some base path. It will take care of making sure that configuration defined in parent directories cascades down to files. A `Repository` is also a directory, but you can request arbitraty paths contained under it, and it will make sure that containing directories are loaded as needed in order to allow the configuration to properly cascade.

The library **does not** convert the file contents into actual markdown - use whichever tool you prefer for doing that.

Example Usage
-------------

[](#example-usage)

Here is some basic example usage.

```
