Skip to content

Commit

Permalink
Fixed the example to work with Swim 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinrenskers committed Jul 15, 2021
1 parent 5a92491 commit d5f7e45
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions Example/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"object": {
"pins": [
{
"package": "cmark",
"package": "cmark-gfm",
"repositoryURL": "https://github.com/brokenhandsio/cmark-gfm.git",
"state": {
"branch": null,
Expand Down Expand Up @@ -51,8 +51,8 @@
"repositoryURL": "https://github.com/loopwerk/SagaSwimRenderer",
"state": {
"branch": null,
"revision": "83a39c0532b05469c38219e357a5810e204dd743",
"version": "0.4.0"
"revision": "fc2f0f27225daccfbd028b496fb4f84ab381f5d2",
"version": "0.5.0"
}
},
{
Expand All @@ -65,12 +65,12 @@
}
},
{
"package": "HTML",
"package": "Swim",
"repositoryURL": "https://github.com/robb/Swim",
"state": {
"branch": null,
"revision": "a17c57dbd3148889b667604cc084417b13f9788f",
"version": "0.1.1"
"revision": "58bf32d8dcac4649d7a4f68a13beb136d6a86dd6",
"version": "0.2.0"
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions Example/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version:5.4

import PackageDescription

Expand All @@ -10,7 +10,7 @@ let package = Package(
dependencies: [
.package(path: "../"),
.package(url: "https://github.com/loopwerk/SagaParsleyMarkdownReader", from: "0.4.0"),
.package(url: "https://github.com/loopwerk/SagaSwimRenderer", from: "0.4.0"),
.package(url: "https://github.com/loopwerk/SagaSwimRenderer", from: "0.5.0"),
],
targets: [
.target(
Expand Down
6 changes: 3 additions & 3 deletions Example/Sources/Example/templates.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func renderArticle(context: ItemRenderingContext<ArticleMetadata, SiteMetadata>)
}
}
}
context.item.body
Node.raw(context.item.body)
}
}
}
Expand Down Expand Up @@ -105,7 +105,7 @@ func renderPage(context: ItemRenderingContext<EmptyMetadata, SiteMetadata>) -> N
baseHtml(siteMetadata: context.siteMetadata, title: context.item.title) {
div(id: "page") {
h1 { context.item.title }
context.item.body
Node.raw(context.item.body)

if context.item.relativeDestination == "about.html" {
h1 { "Apps I've built" }
Expand All @@ -130,7 +130,7 @@ func renderApps(context: ItemsRenderingContext<AppMetadata, SiteMetadata>) -> No
}
}

app.body
Node.raw(app.body)

if let url = app.metadata.url {
p {
Expand Down

0 comments on commit d5f7e45

Please sign in to comment.