Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Serve Markdown files as HTML pages with CSS using just Caddy (github.com/dbohdan)
5 points by indigodaddy on Jan 26, 2024 | hide | past | favorite | 1 comment


Here’s what I use for the exact same goal:

Step 1: Convert to HTML

    mdToHtml {
        files=$(find blog -name "*.md")
        for f in $files; do
            pandoc -f markdown $f > blog/compiled/$(basename "${f%.*}").html
        done
    }

Step 2: Deploy locally

    python -m http.server

Step 2 will vary based on where the static files need to be served.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: