PHPackages                             mistralys/markdown-viewer - 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. [Templating &amp; Views](/categories/templating)
4. /
5. mistralys/markdown-viewer

ActiveLibrary[Templating &amp; Views](/categories/templating)

mistralys/markdown-viewer
=========================

PHP based viewer for Markdown files, to view them with fenced code highlighting and navigation.

1.3.1(2y ago)101.4k↓50%42MITPHPPHP &gt;=7.4

Since Mar 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Mistralys/markdown-viewer)[ Packagist](https://packagist.org/packages/mistralys/markdown-viewer)[ RSS](/packages/mistralys-markdown-viewer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (12)Used By (2)

Markdown documentation viewer
=============================

[](#markdown-documentation-viewer)

PHP based viewer for Markdown files, to view them with fenced code highlighting and navigation.

It is designed to be used for viewing markdown-based documentation files, in a fire and forget way. The layout is based on [Bootstrap 5](https://getbootstrap.com), and does not need any additional configuration.

Requirements
------------

[](#requirements)

- PHP7.4+

Features
--------

[](#features)

- Automatic jump navigation built using the document's headers.
- Easily switch between the available documents.
- Syntax highlighted fenced code blocks.
- Light and dark modes.
- Additional support for "1)" style ordered lists.

Installing
----------

[](#installing)

The package is made to be used as a dependency in a documentation project: Put it in a folder in a webserver, point it to some markdown files, and it will display them.

1. Create a folder in your webroot from which to serve the documentation.
2. Create a composer project there.
3. Require the package: `composer require mistralys/markdown-viewer`.
4. Create a PHP file (`index.php`) as endpoint for the documentation.
5. Paste the following code into the file
6. Edit the list of files you wish to view.
7. Point your browser to the file.

```
