PHPackages                             mprince2k18/markdown-previewer - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mprince2k18/markdown-previewer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mprince2k18/markdown-previewer
==============================

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

0252PHP

Since Jan 4Pushed 3y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

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 4, and does not need any additional configuration.

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

[](#requirements)

- PHP8.0+

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 mprince2k18/markdown-previewer`.
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.

```
