Swiftpack.co - gaetanomatonti/Sparkle as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by gaetanomatonti.
gaetanomatonti/Sparkle 0.3.1-alpha
Make the web shine. ✨
⭐️ 2
🕓 2 weeks ago
.package(url: "https://github.com/gaetanomatonti/Sparkle.git", from: "0.3.1-alpha")


Make the web shine. ✨

Note that the software provided in this package is still in early development, and APIs are subject to changes.

Static Site Generation

Sparkle takes advantage of SSG (Static Site Generation) to generate static websites with a DSL powered by Swift. Static websites are generated at build time and immediately rendered on the client side, shortening the browser's load times.

Creating a Website

To create a website using Sparkle, create a Swift Package in Xcode, then add Sparkle as a dependency in your Package.swift.

dependencies: [
  .package(url: "https://github.com/gaetanomatonti/Sparkle.git", branch: "main")

Create an executable target that depends on Sparkle.

targets: [
    name: "MyWebsite",
    dependencies: [
      .product(name: "Sparkle", package: "Sparkle")

Create main.swift in your target's Source folder. This is the main entry point of your target. Here you can prompt the generation of your website.

struct MyWebsite: Site {
  var homepage: Page {

try MyWebsite().generate()

As a result of the generation, files will be created under your package's Output directory.

Hooray! You've created your very first website with Sparkle.


Stars: 2
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Sparkle 0.3.1
2 weeks ago


  • A new insert(_ rules:) method has been added to add multiple rules at once.


  • A crash that would occur when trying to insert rules by calling the insert(_ rule:) method multiple times, for example in a for loop.
  • Fixed builds failing on Linux environments.


  • Syntax checking for Hex values has been removed.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics