Skip to content

Commit

Permalink
yap templ
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed Mar 9, 2024
1 parent 7cbb839 commit 56bb489
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ Execute `gop run .` and visit http://localhost:8080/p/123, you will get:

#### YAP Template

In most cases, we will not use the `html` directive to return a html page, but use the `yap` template engine. See [get_p_#id.yap](demo/classfile2_blog/get_p_%23id.yap):
In most cases, we don't use the `html` directive to generate html pages, but use the `yap` template engine. See [get_p_#id.yap](demo/classfile2_blog/get_p_%23id.yap):

```coffee
yap "article", {
"id": ${id},
}
```

It means we need to find a template called `article` to render. See [yap/article_yap.html](demo/classfile2_blog/yap/article_yap.html):
It means finding a template called `article` to render. See [yap/article_yap.html](demo/classfile2_blog/yap/article_yap.html):

```html
<html>
Expand Down

0 comments on commit 56bb489

Please sign in to comment.