Skip to content

Minimal PHP markdown parser and HTML generator to create instant websites.

License

Notifications You must be signed in to change notification settings

dthater/md2html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

md2html

A minimal markdown parser and HTML generator written in PHP to create instant websites.

Simple HTML output from a simple markdown file.

Usage

Place your markdown files into the site/pages directory. Call the pages like they were standard html pages, i.e.:

site/pages/welcome.md becomes available via http://localhost:8880/welcome.html

Setup for development

Requirements: Docker (or compatible)

Docker

md2html needs several components to run correctly. This includes rewrite rules engine running, which is served by the Apache web server.

Behind that PHP 5+ is doing the main work.

Run ./run-php-apache.sh from the project's root directory, to setup a docker container running all the requirements.

The default port is 8880, so here is the demo: http://localhost:8880

Testing

Check if runs locally: http://localhost:8880/probe.html

Check if PHP is running properly: http://localhost:8880/probe.php

Check if md2html renders the demo page: http://localhost:8880/md2html.php?file=demo.md

Test the default behavior incl. the rewrite rule: http://localhost:8880/demo.html

Run on your own webspace

Requirements: Apache rewrite rules engine and PHP 5+.

Just copy the contents of the site folder onto your remote machine.

Adjust .htaccess and style.css to your needs.

That's all. Have fun.

About

Minimal PHP markdown parser and HTML generator to create instant websites.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors