Some stupid simple way to share rendred Markdown documents
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Kody 8048007b69 Make heading IDs lowercase 11 months ago
ParsedownFilter@bc1bded52c Add filters to some tags 4 years ago
data Hello 8 years ago
parsedown@6598f3860c Bootstrap 5; Add Highlight.js; Edit README 1 year ago
parsedown-extra@fd33d68349 Bootstrap 5; Add Highlight.js; Edit README 1 year ago
.gitignore gitignore 7 years ago
.gitmodules Add filters to some tags 4 years ago
.htaccess Bootstrap 5; Add Highlight.js; Edit README 1 year ago
LICENSE Initial commit 8 years ago
README.md Bootstrap 5; Add Highlight.js; Edit README 1 year ago
index.php Make heading IDs lowercase 11 months ago

README.md

mdNotes

Some stupid simple way to share rendred Markdown documents

The extension choosen is .md. You can read more about the syntax here: http://daringfireball.net/projects/markdown/syntax

The files are stored inside the data/ folder.

For content that you want to embed (like images) I'd recommend to create a separate folder (I use host/) next to the index.php file.
It can then be used that way: ![Embedded picture](/host/pic.jpg)

How to add and open a file

For this example we'll use doc.md as the file and https://n.kdy.ch as the base URL.

  • Upload your .md file inside the data/ folder.
  • Go to the URL where the index.php is, i.e. https://n.kdy.ch/, and append ?f=doc to the URL. The .md extension is optional.
    The URL should now look like https://n.kdy.ch/?f=doc.
  • You should be able to now see your file.

URL rewriting is available too, but I've inclued it only if you're using it at the root of your (sub-)domain.

Nice URLs

By default, you'll need to share URLs like https://n.kdy.ch/?f=example or https://n.kdy.ch/index.php?f=example.
With some URL rewriting we can make it prettier, like https://n.kdy.ch/example

Nginx Config

You'll need to add or edit the location / {} inside your server {} block, along with your other properties (listen, server_name, root, index, php, ...):

location / {
    # Check if a file exists, or route it to index.php
    try_files $uri $uri/ /index.php?f=$uri;
}

Apache2

Your vHost should have AllowOverride All inside his <Directory /path/to/folder/> node.

You should enable mod_rewrite with a2enmode rewrite and restart Apache2, too.

Then, the .htaccess distributed here sould work.