Skip to content

Do Pug Mixins work with Fiber? #2916

Answered by ghost
ghost asked this question in Q&A
Mar 11, 2024 · 4 comments · 1 reply
Discussion options

You must be logged in to vote

I figured it out by printing the result of pug, err = jade.ParseWithFileSystem(path, buf, e.FileSystem).

It makes sense, the pug templates get compiled into regular Go templates.

Internal variables can be called with a dollar $myVariable.

{{ $lordiconUrl := "App development" }}{{ $title := "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras porta mauris in dolor gravida, ac vehicula mauris ultricies. Integer dignissim, arcu vel sagittis ornare, mi orci accumsan odio, nec eleifend nisi enim eu nisi." }}{{ $description := "https://cdn.lordicon.com/abwrkdvl.json" }}
<lord-icon src="lordiconUrl" trigger="loop" colors="primary:#ffffff,secondary:#ffffff" style="width:100px;height:100px"

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ghost
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants