https://github.com/vapor-community/vapor-elementary
A modern and efficient HTML rendering library - inspired by SwiftUI, built for the web.
https://github.com/vapor-community/vapor-elementary
dsl html swift-on-server vapor web
Last synced: 6 months ago
JSON representation
A modern and efficient HTML rendering library - inspired by SwiftUI, built for the web.
- Host: GitHub
- URL: https://github.com/vapor-community/vapor-elementary
- Owner: vapor-community
- License: apache-2.0
- Created: 2024-07-04T18:17:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-08T14:53:05.000Z (11 months ago)
- Last Synced: 2025-04-24T20:03:54.656Z (6 months ago)
- Topics: dsl, html, swift-on-server, vapor, web
- Language: Swift
- Homepage:
- Size: 20.5 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Elementary: HTML Templating in Pure Swift
**A modern and efficient HTML rendering library - inspired by SwiftUI, built for the web.**
[](https://swiftpackageindex.com/vapor-community/vapor-elementary)
[](https://swiftpackageindex.com/vapor-community/vapor-elementary)
This packages helps you serve [Elementary](https://swiftpackageindex.com/sliemeobn/elementary) HTML web apps with Vapor.
Simply wrap `HTMLResponse` around your HTML content and return it from your routes.
```swift
import Vapor
import VaporElementary
let app = try await Application.make(.detect())
app.get("index") { _ in
HTMLResponse {
MyIndexPage()
}
}
```
Check out the docs in the [Elementary repo](https://github.com/sliemeobn/elementary) for more information.