abiosoft / caddy-git

git middleware for Caddy
http://caddyserver.com/docs/http.git
MIT License
205 stars 43 forks source link

Templates missing before git clone #80

Open evanpaschke opened 6 years ago

evanpaschke commented 6 years ago

I've noticed the following error starting caddy (v0.10.10):

Error during parsing: default template parse error: open site/templates/template.html: no such file or directory

with the following Caddyfile:

localhost:8080 {
        git github.com/user/site {
                hook /push key
        }
        root site
        markdown / {
                ext .md
                template templates/template.html
        }
}

Caddy throws the error and exits before the git plugin clones the repo. Would it be possible for the git plugin to defer template loading until the repo is cloned successfully?

abiosoft commented 6 years ago

Hmmm, except adding the option of allowing the git plugin to block Caddy's startup until successful clone.