https://github.com/devidw/eta-slots-plugin
https://github.com/devidw/eta-slots-plugin
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/devidw/eta-slots-plugin
- Owner: devidw
- License: unlicense
- Created: 2023-05-01T15:02:46.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-01T15:02:48.000Z (almost 3 years ago)
- Last Synced: 2024-10-18T21:04:24.040Z (over 1 year ago)
- Language: TypeScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# eta slots plugin
all credits go to [alexkar598](https://github.com/alexkar598), [@see](https://github.com/eta-dev/eta/discussions/224#discussioncomment-5748686)
```console
pnpm add eta-slots-plugin
```
```ts
import * as eta from "eta"
import etaSlotsPlugin from "eta-slots-plugin"
eta.configure({
plugins: [etaSlotsPlugin],
})
```
_layout.eta_
```eta
<% slot("some-slot") ${ %>
some default content
<% } %>
```
_child.eta_
```eta
<% layout("layout") %>
<% content("some-slot") ${ %>
some slot content
<% } %>
```