template function for css and js?
- Dominant language
- Go
- Stars
- 77
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Hi @kataras thank you very much for creating the iris framework and blocks. I am new to go but i miss something to get started. I have basic `view` folder with an `index.html` like this:
```html
Index Body
Message: {{.Message}}
h1 {
color: red;
}
h3 {
color: green;
}
alert('Hello World');
```
inside my `layouts/main.html` file i define the templates `css` and `js` like this:
```html
{{.Title}}
{{ template "css" . }}
{{ template "js" . }}
{{ template "content" . }}
{{ partial "partials/footer" . }}
```
You can probably already guess what I would like to achieve. The `styles` and the `js` code from the `index.html` should be inserted into the `main.html` automatically, just like it happens with the `content` template function.
Is that possible? How can i achieve this? Could blocks support this as well?
Contributor guide
Assessment
This issue has not been assessed yet.