A lightweight markdown rendering and embedding service. Write markdown in your browser and embed it anywhere with an iframe or direct link.
- Docker (recommended)
- Python 3.9+ (for local development)
- SQLite3
Recommended: use reverse proxy like Nginx or Caddy
server {
listen 443 ssl;
server_name your-domain.com;
ssl_certificate /path/to/fullchain.pem;
ssl_certificate_key /path/to/privkey.pem;
location / {
proxy_pass http://localhost:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
- Clone the repository:
git clone https://github.com/elimelt/embed.git
cd embed
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
- Install dependencies:
pip install -r requirements.txt
- Run the development server:
uvicorn src.main:app --reload --port 8000
The service will be available at http://localhost:8000
- Build the Docker image:
docker build -t server:embed .
- Run the Docker container:
docker run -p 80:80 server:embed
POST /api/embeds
Content-Type: application/json
{
"content": "# Your Markdown Content"
}
GET /api/embeds/{embed_id}
Authorization: {auth_key}
PUT /api/embeds/{embed_id}
Authorization: {auth_key}
Content-Type: application/json
{
"content": "# Updated Content"
}
DELETE /api/embeds/{embed_id}
Authorization: {auth_key}
Once you've created a markdown document, you can embed it in two ways:
- iframe Embed:
<iframe
src="http://your-domain/embed/{uuid}"
width="100%"
height="500px"
frameborder="0"
></iframe>
- Direct Link:
http://your-domain/view/{uuid}
⌘ + P
: Preview markdown⌘ + Enter
: Save/update current document⇧ + ⌘ + Enter
: Create new document⌘ + C
: Copy embed code/link
MIT License - see LICENSE