Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The `description` field brielfly explains the motivation for this custom collect

The optional `badge` field is used to style the small badge next to the collection name on the package page. If omitted, the collection will have no badge.

Finally, the `url` field points to a location where you maintain a list of package URLs that belong to the collection. There should be of the format `https://github.com/author/package.git`. In particular, make sure the URL scheme is `https` and the `.git` suffix is included.
Finally, the `url` field points to a location where you maintain a list of package URLs that belong to the collection. These should be of the format `https://github.com/author/package.git`. In particular, make sure the URL scheme is `https` and the `.git` suffix is included.

We match the listed packages against the list of all packages in the Swift Package Index and include only the ones we are able to match. Note that the matching is case-insensitive.

Expand Down
4 changes: 2 additions & 2 deletions Resources/Blog/posts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,5 +196,5 @@
- slug: introducing-custom-package-collections
title: Introducing custom package collections
summary: We've added support for custom package collections to allow well-known community efforts to present package collections.
published_at: 2024-11-22
published: false
published_at: 2024-12-09
published: true
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ extension API.PackageController.GetRoute {
}

static func customCollections(on database: Database, package: Package) async -> [CustomCollection.Details] {
@Dependency(\.environment) var environment
guard environment.current() == .development else { return [] }
do {
try await package.$customCollections.load(on: database)
return package.customCollections.map(\.details)
Expand Down
4 changes: 0 additions & 4 deletions Sources/App/Views/PackageController/GetRoute.Model+ext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,6 @@ extension API.PackageController.GetRoute.Model {
}

func customCollectionsListItem() -> Node<HTML.ListContext> {
@Dependency(\.environment) var environment
guard environment.current() == .development
else { return .empty }

guard customCollections.isEmpty == false
else { return .empty }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ <h4>When working with a Swift Package Manager manifest:</h4>
<a href="https://github.com/Alamofire/Alamofire/pulls">5 open pull requests</a>. The last issue was closed 5 days ago and the last pull request was merged/closed 6 days ago.
</li>
<li class="dependencies">This package depends on 2 other packages.</li>
<li class="custom-collections">Member of the
<a href="/collections/custom-collection">Custom Collection</a> collection.
</li>
<li class="license"> licensed</li>
<li class="stars">17 stars</li>
<li class="libraries">3 libraries</li>
Expand Down
Loading