From d16ba9ffe9661e727fa4f8f9ad30a1203ce96b78 Mon Sep 17 00:00:00 2001 From: dreamjz <25699818+dreamjz@users.noreply.github.com> Date: Mon, 18 Dec 2023 22:10:33 +0800 Subject: [PATCH] fix: Add clear instruction on how to define an HTML template file. --- content/en/docs/examples/html-rendering.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/en/docs/examples/html-rendering.md b/content/en/docs/examples/html-rendering.md index cfa8e825a..cc56d7471 100644 --- a/content/en/docs/examples/html-rendering.md +++ b/content/en/docs/examples/html-rendering.md @@ -49,6 +49,8 @@ func main() { } ``` +**Note:** Please wrap your HTML template in the `{{define }} {{end}}` block and define your template file with the relative path ``. Otherwise, GIN will not properly parse the template files. + templates/posts/index.tmpl ```html