# Download caddy sources with all dependencies
go get -u github.com/mholt/caddy/caddy
# Download caddy-filter with all dependencies
go get -u github.com/echocat/caddy-filter
# Configure caddy to use caddy-filter
sed -i 's/\t\/\/ This is where other plugins get plugged in (imported)/\t_ "github.com\/echocat\/caddy-filter"/' $GOPATH/src/github.com/mholt/caddy/caddy/caddymain/run.go
# Add Caddyfile
cat << EOF > /tmp/Caddyfile
localhost:2020
root /tmp
markdown
filter rule {
content_type text/.*
search_pattern "Replace me!"
replacement "OK!"
}
EOF
# Add example index file
cat << EOF > /tmp/index.md
<html>
<head><title>Replace me!</title></head>
<body><p>Replace me!</p></body>
</html>
EOF
# Build caddy
go build -o $GOPATH/bin/caddy github.com/mholt/caddy/caddy
# Run caddy
caddy -conf /tmp/Caddyfile
#3. Check result
Open http://localhost:2020 and you should see the text OK! in your browser. If you see Replace me! or an error the latest fixes was not applied to this build.
The build server caches them indefinitely, until I update it. I have to update the build server manually until the new website is released. Sorry I’ll try to get to it sometime.
I hope we can flush this in the near future because I fixed to important issues for some guys and I’am happy to broad it to them as fast as possible. Thank you for your time.