简体   繁体   中英

In Golang web application development, is it possible to use Go's template with the jade (pug) template engine?

I'm developing Go web application and using Go's built-in template. I can use Emmet to quickly generate HTML code snippets. However, I do prefer the succinct jade template engine (renamed to pug recently). I want to know if it possible to use jade (pug) with Go and how to set it up. Thanks in advance.

pixy与Pug / Jade非常相似,并通过打包提供了代码生成器,以通过Go类型安全性实现非常高的性能。

The hard way would be to have a separated nodejs process to compile the template on the go. The easy way would be, like @Mario said, to use a golang implementation of jade engine.

Take a look at this library and the documentation .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM