Sign inSign up

garretpremo/pad

By garretpremo

•Updated 6 months ago

Image
0

200

garretpremo/pad repository overview

⁠Pad

A standalone, stateless markdown viewer and editor. The entire note is base64-encoded in the URL — no database, no server state, no auth. Share a link and the recipient sees rendered markdown.

⁠Features

  • Markdown preview with toggle to edit mode
  • URL updates in real-time as you edit — the link is always shareable
  • Copy button to grab raw markdown
  • No storage, no WebSocket, no database — the URL is the content
  • Dark theme

⁠Quick Start

docker run -p 3099:3000 garretpremo/pad:latest

Then visit http://localhost:3099⁠

encoded=$(base64 -w0 < myfile.md | tr '+/' '-_' | tr -d '=')
echo "http://localhost:3099/${encoded}"

See utility script below

⁠Example

http://localhost:3000/SGVsbG8gV29ybGQ renders "Hello World".

⁠Docker Compose
services:
  pad:
    image: garretpremo/pad:latest
    ports:
      - "3099:3000"

⁠Configuration

VariableDefaultDescription
PORT3000Server port

⁠Utility script

#!/bin/bash
set -euo pipefail

HOST="localhost:3099"

file="${1:-}"
if [ -z "$file" ] || [ ! -f "$file" ]; then
  echo "Usage: generate-pad.sh <file>" >&2
  exit 1
fi

encoded=$(base64 -w0 < "$file" | tr '+/' '-_' | tr -d '=')
xdg-open "https://${HOST}/${encoded}"

Tag summary

Content type

Image

Digest

sha256:9c750e13d…

Size

84.3 MB

Last updated

6 months ago

docker pull garretpremo/pad