After watching the github page for month ! I’ve joined the adventure and deployed my first caddy 2 instance !
Still i’ve some issue with the doc.
I’m using the latest release of caddy 2
caddy version
v2.0.0-rc.3 h1:z2H/QnaRscip6aZJxwTbghu3zhC88Vo8l/K57WUce4Q=
On the Caddyfile tutorial part (Caddyfile Tutorial — Caddy Documentation) :
When using the template directive with the sample html file the date displayed is still 2006 instead of the date of today as expected.
I have the same issue on Windows or Debian OS
This is the caddy file i used, the same as the docs
Ah, okay, that’s what I thought. Remove the <!-- --> and it should work. Templates use the {{ }} syntax.
The problem is that the Caddy docs website is also rendered using templates, and if the HTML comments are not there, then the docs would not have that placeholder rendered correctly. I think some change happened to the site that caused the comments to get incorrectly preserved in the rendered markdown. I’ll look into it.
<!DOCTYPE html>
<html>
<head>
<title>Caddy tutorial</title>
</head>
<body>
<p>The Date of the day is: {{now | date "Mon 2 Jan 15:04:05 CEST 2006"}} </p>
<p> The Date of the day as timezone is : {{dateInZone "02-01-2006" (now) "CEST"}}
<p>The WebServer is : {{.Host}} </p>
<p>Your IP is : {{.RemoteIP}} </p>
<p>Here some Mutiplication. 2 X 128 = {{ mul 2 128}}
</body>
</html>
It’s not necessary to have Caddy run as group www-data but the caddy user can easily be added to the user group www-data. Maybe we should add that as a step to the docs for installing as a Linux service.