From f8052460b3eea2115d1d482b8aec7accd8fea0ef Mon Sep 17 00:00:00 2001 From: Rory Hinnen Date: Sun, 3 May 2026 12:57:26 -0500 Subject: [PATCH] initial --- hinnen/.gitignore | 9 +++++++++ hinnen/Assets/Assets.txt | 1 + hinnen/Assets/images/Images.txt | 1 + hinnen/Content/Content.txt | 3 +++ hinnen/Includes/Includes.txt | 1 + hinnen/LICENSE | 22 ++++++++++++++++++++ hinnen/Package.swift | 17 ++++++++++++++++ hinnen/README.md | 5 +++++ hinnen/Sources/Layouts/MainLayout.swift | 11 ++++++++++ hinnen/Sources/Pages/Home.swift | 11 ++++++++++ hinnen/Sources/Site.swift | 27 +++++++++++++++++++++++++ 11 files changed, 108 insertions(+) create mode 100644 hinnen/.gitignore create mode 100644 hinnen/Assets/Assets.txt create mode 100644 hinnen/Assets/images/Images.txt create mode 100644 hinnen/Content/Content.txt create mode 100644 hinnen/Includes/Includes.txt create mode 100644 hinnen/LICENSE create mode 100644 hinnen/Package.swift create mode 100644 hinnen/README.md create mode 100644 hinnen/Sources/Layouts/MainLayout.swift create mode 100644 hinnen/Sources/Pages/Home.swift create mode 100644 hinnen/Sources/Site.swift diff --git a/hinnen/.gitignore b/hinnen/.gitignore new file mode 100644 index 0000000..c139bd8 --- /dev/null +++ b/hinnen/.gitignore @@ -0,0 +1,9 @@ +.DS_Store +Build +.build +Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/hinnen/Assets/Assets.txt b/hinnen/Assets/Assets.txt new file mode 100644 index 0000000..2ceb5c2 --- /dev/null +++ b/hinnen/Assets/Assets.txt @@ -0,0 +1 @@ +Place any assets you want copied into the build here. \ No newline at end of file diff --git a/hinnen/Assets/images/Images.txt b/hinnen/Assets/images/Images.txt new file mode 100644 index 0000000..5fb2ad6 --- /dev/null +++ b/hinnen/Assets/images/Images.txt @@ -0,0 +1 @@ +This is the best place to put images for your build, creating subfolders below here as needed. \ No newline at end of file diff --git a/hinnen/Content/Content.txt b/hinnen/Content/Content.txt new file mode 100644 index 0000000..47aea1c --- /dev/null +++ b/hinnen/Content/Content.txt @@ -0,0 +1,3 @@ +If you want Ignite to generate pages based on Markdown files, you should place them in here. You can group your content however, you want – category, year, etc – just by placing them into subfolders of Content. + +The same path (minus "Content") is used to place your rendered Markdown files in the Build folder, but you can also use the "path" YAML front matter to customize this. \ No newline at end of file diff --git a/hinnen/Includes/Includes.txt b/hinnen/Includes/Includes.txt new file mode 100644 index 0000000..08d3c15 --- /dev/null +++ b/hinnen/Includes/Includes.txt @@ -0,0 +1 @@ +If you need to import some pre-written HTML, you can place files here then bring them into your project using Include("YourFilename.html"). The Include element automatically looks in this Includes folder. \ No newline at end of file diff --git a/hinnen/LICENSE b/hinnen/LICENSE new file mode 100644 index 0000000..781edbb --- /dev/null +++ b/hinnen/LICENSE @@ -0,0 +1,22 @@ +IgniteStarter +MIT License + +Copyright (c) 2024 Paul Hudson and other authors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/hinnen/Package.swift b/hinnen/Package.swift new file mode 100644 index 0000000..65a091d --- /dev/null +++ b/hinnen/Package.swift @@ -0,0 +1,17 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "IgniteStarter", + platforms: [.macOS(.v13)], + dependencies: [ + .package(url: "https://github.com/twostraws/Ignite.git", branch: "main") + ], + targets: [ + .executableTarget( + name: "IgniteStarter", + dependencies: ["Ignite"]), + ] +) diff --git a/hinnen/README.md b/hinnen/README.md new file mode 100644 index 0000000..3c59798 --- /dev/null +++ b/hinnen/README.md @@ -0,0 +1,5 @@ +# IgniteStarter + +This repository contains a starter project built using the [Ignite static site generator](https://github.com/twostraws/Ignite) – it includes just enough to get you going, so you should refer to the [IgniteSamples](https://github.com/twostraws/IgniteSamples) repository for detailed code samples. + +You'll find small text file in each folder explaining what that folder does. Once you're happy with that, you should delete those files. diff --git a/hinnen/Sources/Layouts/MainLayout.swift b/hinnen/Sources/Layouts/MainLayout.swift new file mode 100644 index 0000000..21476b8 --- /dev/null +++ b/hinnen/Sources/Layouts/MainLayout.swift @@ -0,0 +1,11 @@ +import Foundation +import Ignite + +struct MainLayout: Layout { + var body: some Document { + Body { + content + IgniteFooter() + } + } +} diff --git a/hinnen/Sources/Pages/Home.swift b/hinnen/Sources/Pages/Home.swift new file mode 100644 index 0000000..c7c1411 --- /dev/null +++ b/hinnen/Sources/Pages/Home.swift @@ -0,0 +1,11 @@ +import Foundation +import Ignite + +struct Home: StaticPage { + var title = "Home" + + var body: some HTML { + Text("Hello world!") + .font(.title1) + } +} diff --git a/hinnen/Sources/Site.swift b/hinnen/Sources/Site.swift new file mode 100644 index 0000000..505d781 --- /dev/null +++ b/hinnen/Sources/Site.swift @@ -0,0 +1,27 @@ +import Foundation +import Ignite + +@main +struct IgniteWebsite { + static func main() async { + var site = ExampleSite() + + do { + try await site.publish() + } catch { + print(error.localizedDescription) + } + } +} + +struct ExampleSite: Site { + var name = "Hello World" + var titleSuffix = " – My Awesome Site" + var url = URL(static: "https://www.example.com") + var builtInIconsEnabled = true + + var author = "John Appleseed" + + var homePage = Home() + var layout = MainLayout() +}