https://github.com/devidw/eta-slots-plugin
https://github.com/devidw/eta-slots-plugin
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/devidw/eta-slots-plugin
- Owner: devidw
- License: unlicense
- Created: 2023-05-01T15:02:46.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-01T15:02:48.000Z (about 2 years ago)
- Last Synced: 2024-10-18T21:04:24.040Z (8 months 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
<% } %>
```