A Swift DSL for HTML based on pointfreeco/swift-html and updated to the version on pointfreeco/pointfreeco.
You can create HTML documents using a declarative, SwiftUI-like syntax, with support for type-safe CSS:
import HTML
// Assuming an HTMLPreview: HTMLDocument type
let document = HTMLPreview {
h1 { "Type-safe HTML" }
}
This project builds upon the foundational work by the Point-Free team, particularly Brandon Williams and Stephen Celis. This library is a fork and adaptation of their open-source projects, with the goal of making these ideas more accessible and customizable for various use cases. Thank you, Point-Free!
You can add pointfree-html
to an Xcode project by including it as a package dependency:
Repository URL: https://github.com/coenttb/pointfree-html
For a Swift Package Manager project, add the dependency in your Package.swift file:
dependencies: [
.package(url: "https://github.com/coenttb/pointfree-html", branch: "main")
]
- swift-css: A Swift DSL for type-safe CSS.
- swift-html: A Swift DSL for type-safe HTML & CSS, integrating swift-css and pointfree-html.
- coenttb-html: Extends swift-html with additional functionality and integrations for HTML, Markdown, Email, and printing HTML to PDF.
- swift-web: Modular tools to simplify web development in Swift forked from pointfreeco/swift-web, and updated for use in coenttb-web.
- coenttb-web: A collection of features for your Swift server, with integrations for Vapor.
- coenttb-com-server: The backend server for coenttb.com, written entirely in Swift and powered by Vapor and coenttb-web.
- swift-languages: A cross-platform translation library written in Swift.
If you’re working on your own Swift project, feel free to learn, fork, and contribute.
Got thoughts? Found something you love? Something you hate? Let me know! Your feedback helps make this project better for everyone. Open an issue or start a discussion—I’m all ears.
PointFreeHtml is licensed under the MIT License. See MIT POINTFREE LICENSE for details.