Swiftpack.co - Package - SDGGiesbrecht/SDGWeb

🇨🇦EN

macOS • Linux • iOS • watchOS • tvOS

Documentation

SDGWeb

SDGWeb provides tools for generating websites.

כְּשִׁמְךָ אֱלֹהִים כְּן תְּהלָּתְךָ עַל־קַצְוֵי־אֶרֶץ׃
Like your name, O God, your praise reaches to the ends of the earth.

                                                                                                    ―sons of קורח/Koraẖ

Features

  • Sites are constructed from simple templates.
  • Customizable template processing in Swift.
  • Supports localized websites.

(For a list of related projects, see here.)

Importing

SDGWeb provides a library for use with the Swift Package Manager.

Simply add SDGWeb as a dependency in Package.swift:

let package = Package(
    name: "MyPackage",
    dependencies: [
        .package(url: "https://github.com/SDGGiesbrecht/SDGWeb", .upToNextMinor(from: Version(0, 0, 3))),
    ],
    targets: [
        .target(name: "MyTarget", dependencies: [
            .productItem(name: "SDGWeb", package: "SDGWeb"),
        ])
    ]
)

The library’s module can then be imported in source files:

import SDGWeb

Example Usage

let mock = RepositoryStructure(root: URL(fileURLWithPath: #file).deletingLastPathComponent().deletingLastPathComponent().appendingPathComponent("Mock Projects/\(mockName)"))
let site = Site<L>(
    repositoryStructure: mock,
    domain: UserFacing<StrictString, L>({ _ in return "http://example.com" }),
    localizationDirectories: UserFacing<StrictString, L>({ localization in return localization.icon ?? StrictString(localization.code) }),
    pageProcessor: Processor(),
    reportProgress: { _ in })
try site.generate()

About

The SDGWeb project is maintained by Jeremy David Giesbrecht.

If SDGWeb saves you money, consider giving some of it as a donation.

If SDGWeb saves you time, consider devoting some of it to contributing back to the project.

Ἄξιος γὰρ ὁ ἐργάτης τοῦ μισθοῦ αὐτοῦ ἐστι.
For the worker is worthy of his wages.

                                                                                                    ―‎ישוע/Yeshuʼa

Github

link
Stars: 1
Help us keep the lights on

Dependencies

Used By

Total: 0

Releases

0.0.3 - Apr 9, 2019

Third pre‐release.

0.0.2 - Dec 1, 2018

Second pre‐release.

0.0.1 - Nov 29, 2018

Initial pre‐release.