Skip to content

Serve Markdown files as HTML pages with CSS using just Caddy

License

Notifications You must be signed in to change notification settings

dbohdan/caddy-markdown-site

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 (just test).
    • entr for development (just dev).
    • just to run the tasks.

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published