Simple Markdown Paste
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Markus Bergholz 25088b9eb5 demo url update 6 years ago
css initial release 6 years ago
fonts/ionicons initial release 6 years ago
images initial release 6 years ago
js 1. editor saves now in local cache for the entry page. 6 years ago
README.md demo url update 6 years ago
config.php.template rename config.php.template info 6 years ago
favicon.ico initial release 6 years ago
foldercheck.sh 1. editor saves now in local cache for the entry page. 6 years ago
get.php 1. editor saves now in local cache for the entry page. 6 years ago
htaccess.txt add htaccess file for apache 6 years ago
index.php add template link in 'about' section 6 years ago
monitor.sh add monitor.sh script for md/ folder 6 years ago
rm-md-files.sh initial release 6 years ago
template.md 1. editor saves now in local cache for the entry page. 6 years ago

README.md

Markdown Paste

This is a simple Markdown Paste service, based on Minimalist Online Markdown Editor

Online Demo

Setup

  • create a folder for markdown files, e.g. md/ and make it writeable for the webserver
  • modify config.php.template file (domain, folder for markdown files, id length etc.) and rename it to config.php
  • setup webserver
    • see lighty config below
    • for apache htaccess file is added
  • foldercheck.sh
    • Is executed by PHP everytime when someone is pasting.
    • It start deleting files when the folder is bigger than ~10MB
    • 1. stage: delete all files which are older than 30 days
    • 2. stage: delete all files which are smaller than 1kb
    • 3. stage: delete all files which are smaller than 10kb

lighttpd config

   $HTTP["host"] == "mp.osuv.de" {
        evhost.path-pattern = "/srv/http/osuv/mp.osuv.de/"
        url.rewrite-if-not-file = (
                "^/([a-zA-Z0-9]+)" => "/index.php?id=$1"
        )
    }