dbohdan / caddy-markdown-site

Serve Markdown files as HTML pages with CSS using just Caddy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

caddy-markdown-site

This project allows you to serve Markdown files as adequately good-looking minimal web pages with the Caddy web server. It is not a static site generator; there is no build step. It consists of a configuration file (Caddyfile) and some templates. You will need some knowledge of Caddy to use and customize it.

Features

  • If your file is demo/foo.md and your domain example.com, you will be able to access the file as both example.com/foo.md and example.com/foo with no extension.
  • index.md serves as a directory index (but index.html has priority).
  • You can customize the look of your site without touching the main template. Edit templates/{head,header,footer}.html to do it. head.html links the style sheet.
  • An error page is shown on error.

Screenshot

A screenshot the index page of the demo website

Requirements

  • Caddy 2.4 or later.
  • Optional:
    • Deno 1.31 or later to run the tests (make test).
    • entr for development (make dev).

License

MIT.

index.html derives from the index.html template used on the Caddy website.

axist.min.css is axist, a classless CSS library.

photo.jpg by Siarhei Plashchynski on Unsplash.

Unsplash grants you an irrevocable, nonexclusive, worldwide copyright license to download, copy, modify, distribute, perform, and use photos from Unsplash for free, including for commercial purposes, without permission from or attributing the photographer or Unsplash. This license does not include the right to compile photos from Unsplash to replicate a similar or competing service.

About

Serve Markdown files as HTML pages with CSS using just Caddy

License:MIT License


Languages

Language:TypeScript 52.5%Language:HTML 42.2%Language:Makefile 5.3%