• Stars
    star
    144
  • Rank 254,711 (Top 6 %)
  • Language
    Go
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

simple markdown server (optional indexing, no symlinks) report bugs: https://github.com/aerth/markdownd/issues (Heroku takes a couple seconds to load. Patience...)

markdownd

markdownd [flags] <directory>

markdownd -toc -header theme/header.html -footer theme/footer.html .

markdownd -index=gen .

Go Report Card Build Status

Markdown Server

  • tries markdown file (.md) in .html request (/index.html tries /index.md first)
  • will serve .html if exists
  • serves static files and downloads if not .html or .md
  • optional indexing (default: off, use -index=gen or -index=README.md)
  • no symlinks
  • no ../ paths
  • raw markdown source requests ( example: GET /index.md?raw )
  • custom index page (use flag: -index README.md)
  • generates table of contents with -toc flag
  • themed html with -header and -footer flag
  • now with syntax highlighting (use flag: -syntax)

Usage

  • GET / will show a 404 unless -index flag is used (-index=gen to generate)
  • GET /README.md or GET /README.html will process the markdown file and serve HTML.
  • GET /README.md?raw will serve raw markdown source
  • To generate index page (with links to files), use -index=gen
  • To serve custom index.md, use -index=index.md

Example use case: live preview your git repository's README.md

From your project repository that contains a README.md file, run markdownd like so:

markdownd -index=README.md .

And visit http://localhost:8080/ in your browser

Installation

Compile using Go (from any directory)

git clone https://github.com/aerth/markdownd
cd markdownd
make && sudo make install

If you don't want to install the server system-wide, or you don't have root privileges, replace last line with:

make && make install INSTALLDIR=$HOME/bin

Or using legacy go get

GOFLAGS=-tags=netgo,osusergo GOBIN=$HOME/bin go get -v github.com/aerth/markdownd

Download binary for your OS (old versions)

Latest Release

Consider installing go and building from source, Its fast and easy.

Docker

When using the docker image, markdownd servest the /opt directory, and exposes port 8080.

You will want to share a directory into /opt and forward the port (using docker's -v and -p flags).

For example (modify $PWD/docs and 8888 to suit your needs):

docker run -it -v $PWD/docs:/opt -p 8888:8080 aerth/markdownd

Free and Open Source

The MIT License (MIT)

Copyright (c) 2017-2020  aerth <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a 
copy of this software and associated documentation files (the 
"Software"), to deal in the Software without restriction, including 
without limitation the rights to use, copy, modify, merge, publish, 
distribute, sublicense, and/or sell copies of the Software, and to 
permit persons to whom the Software is furnished to do so, subject to 
the following conditions:

The above copyright notice and this permission notice shall be included 
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contributing:

  • pull requests welcome
  • bugs/issues/features very welcome
  • please 'gofmt -w -l -s' before commits

More Repositories

1

rpg

OpenGL cross platform topdown 2d magic action rpg game single player arpg
Go
26
star
2

diamond

Runlevel 1, you stay unix socket. Runlevel 3, you listen tcp! Kicks old process on boot. Shuts down when kicked by new process. Could contribute to less downtime between app restarts and upgrades.
Go
23
star
3

seconfig

super easy encrypted config
Go
14
star
4

go-quitter

Experimental GNU Social ( statusnet ) client and library
Go
14
star
5

striss

Stress Test your Icecast server in Golang (Can you Go over 9000?)
Go
11
star
6

tgun

Go TCP/HTTP Library, Easy headers, proxy, auth and user agent. Now also a libcurl replacement for C programs.
Go
10
star
7

playwav

play a wav file using Golang, ALSA
Go
7
star
8

cosgo

πŸ“ Experimental (broken?) Contact Form Server. Saves to local .mbox file... Option for GPG, SendGrid. Easy Heroku deployment.
Go
6
star
9

go-selly

(unofficial) Go wrapper for Selly API (cryptocurrency ecommerce gateway)
Go
5
star
10

harambes-toolkit

Harambe's Toolkit - Archiver, Share to Twitter, Dissenter (chrome-extension)
JavaScript
4
star
11

docker-boltcms

Bolt CMS on Alpine + nginx + php-fpm
PHP
4
star
12

clix

CUI widget toolkit (unmaintained)
Go
4
star
13

gdoc2pdf

gdoc2pdf downloads a PDF file from a Google Docs URL from the command line
Go
3
star
14

sh

⚑ Collection of #! for your ~
Shell
3
star
15

gh-sync

List or Clone all (your) github repositories (ssh or https)
Go
3
star
16

webd

Go Boilerplate Web Application
Go
3
star
17

fforum

Simple forum library for your Go web application. Uses BoltDB and a passwd file. No dependencies.
Go
3
star
18

helper

Command Line Assistant
Go
2
star
19

2fa-qt

QT frontend for 2fa command (https://github.com/rsc/2fa)
C++
2
star
20

shrinkbolt

shrink bolt (bbolt) database library
Go
2
star
21

make.go

build script for go programs
Go
2
star
22

spawn

Spawn like a salmon - Simple go package to respawn the current process
Go
2
star
23

soundboard

opengl animal soundboard
Go
2
star
24

nullserver

a server that just occupies a port and reads and (optionally) logs (tcp/udp)
Go
2
star
25

spotbitcoin

HTML embed code live Bitcoin price index image. Price is USD/BTC, Time is UTC, CoinDesk API. (Heroku takes a couple seconds to load. Patience...)
Go
2
star
26

golang.so

skeleton shared object project (.so, .dll) using cgo
Makefile
1
star
27

crossbuild

Cross compile a go program for all os/arch. Modify for *your* build process.
Shell
1
star
28

sshd-useradd

useradd via ssh
Go
1
star
29

bookmark-extract

bookmark-extract outputs your bookmarks exactly how you want them. csv, single line, etc
Go
1
star
30

seconf

Go library to create and read non-plaintext configuration files. Use seconfig instead:
Go
1
star
31

RuneDiet

Simple CLI game written in Go
Go
1
star
32

ecommerce-store

Go
1
star
33

modem

AM/ASK in Go
Go
1
star
34

socketserve

serve http on unix socket
Go
1
star
35

ahex

hex decoder/encoder (files and streams)
Go
1
star
36

passwd

Simple passwd library for web application authentication. Uses a single file.
Go
1
star
37

worktimer-gtk

GTK Status Icon for timing your computer time
Go
1
star
38

aevocab

base58 tool with multiple rounds capability (decode/encode files and streams)
Go
1
star
39

middleman

http handler middleware
Go
1
star
40

thumber

thumbnail server ( png jpg jpeg gif )
Go
1
star
41

new-repo

New Github repository without leaving terminal. Simple bash script sends request using cURL to GitHub API.
Shell
1
star
42

gogetwhat

pip search for go (search github for go packages from command line)
Go
1
star
43

slow

Slow (buffered) pager
Go
1
star
44

Forum

Forum web application using boltdb and passwd (no dependencies)
HTML
1
star
45

userinfo

Userinfo Library for Web applications to use BoltDB
Go
1
star
46

kodi.addons

kodi addon repository
1
star
47

go-buildid

There is a Go build ID inside your ELF, go-buildid simply prints it
Go
1
star
48

tlde

tilde web server (GET /~user/)
Go
1
star
49

godev

go development container
Dockerfile
1
star
50

brokenscreen

Android broken screen adb screencap refresh html page
Shell
1
star
51

sha384

File Integrity
Go
1
star
52

ircb

irc bot using go plugins
Go
1
star
53

selly-notify-bot

heroku selly telegram bot that listens for new incoming orders
Go
1
star
54

erro

my error
Go
1
star
55

argon2-xor

Encrypt and Decrypt Files (password based symmetric encryption)
Go
1
star
56

servest

Small, Simple HTTP Fileserver
Go
1
star
57

secenv

Store non-plaintext environmental variables. ⚠️
Go
1
star
58

json5

[ // comments in your json
Go
1
star
59

bashchain

stupid proof-of-work chain bash script
Shell
1
star
60

action

Helper script for recording asciinema screencasts (bash shell script)
Shell
1
star
61

gomaker

Makefile generator for Go projects.
Go
1
star
62

servit

python2 curses menu
Shell
1
star