https://github.com/goat-framework/lamb
Go templating engine
https://github.com/goat-framework/lamb
framework golang package template template-engine
Last synced: 3 months ago
JSON representation
Go templating engine
- Host: GitHub
- URL: https://github.com/goat-framework/lamb
- Owner: goat-framework
- License: mit
- Created: 2024-08-07T02:48:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-11T01:39:32.000Z (over 1 year ago)
- Last Synced: 2024-08-11T22:34:17.791Z (over 1 year ago)
- Topics: framework, golang, package, template, template-engine
- Language: Go
- Homepage:
- Size: 34.2 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/goat-framework/lamb/actions)
[](https://goreportcard.com/report/github.com/goat-framework/lamb)

# Lamb
Intuitive templating engine for Go!
## Directives
These new directives clean up your templates making them easy as pie to read!
```
Title
@if LoggedIn
Hello {{ User }}
@else
Login
@end
```
These directives compile directly into the standard libary's syntax!
```
Title
{{ if .LoggedIn }}
Hello {{ .User }}
{{ else }}
Login
{{ end }}
```
Easier on the eyes right?
## UI Components
Having troubles reusing components in your application?
Check out the ui components.
_main.lamb.html_
```
Submit
```
_components/input.lamb.html_
```
```
_compiled_
```
Submit
```
## Wrap UI Components
Need to wrap some content in a custom component?
_main.lamb.html_
```
Submit
```
_components/button.lamb.html_
```
```
_compiled_
```
Submit
```
## Create Themes With Ease
Let's mix and match to create an awesome form!
_main.lamb.html_
```
Email
Name
Submit
```
_components/form.lamb.html_
```
```
_components/label.lamb.html_
```
```
_components/input.lamb.html_
```
```
_components/button.lamb.html_
```
```
_compiled_
```
Email
Name
Submit
```
## Pass Attributes Down To Components
My labels and inputs need special attributes for each component!
Here's how to implement that.
_main.lamb.html_
```
Email
```
_label.lamb.html_
```
```
_input.lamb.html_
```
```
_compiled_
```
Email
```