Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 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 (8 months ago)
- Default Branch: main
- Last Pushed: 2024-10-04T14:38:12.000Z (5 months ago)
- Last Synced: 2024-11-11T00:52:24.807Z (3 months ago)
- Topics: dsl, html, swift-on-server, vapor, web
- Language: Swift
- Homepage:
- Size: 16.6 KB
- Stars: 4
- 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 VaporElementarylet 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.